| To: | "David S. Miller" <davem@xxxxxxxxxxxxx> |
|---|---|
| Subject: | [BUG] overflow in net/ipv4/route.c rt_check_expire() |
| From: | Eric Dumazet <dada1@xxxxxxxxxxxxx> |
| Date: | Wed, 16 Mar 2005 11:47:34 +0100 |
| Cc: | netdev@xxxxxxxxxxx |
| In-reply-to: | <20050315103253.590c8bfc.davem@xxxxxxxxxxxxx> |
| References: | <42370997.6010302@xxxxxxxxxxxxx> <20050315103253.590c8bfc.davem@xxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 |
After having hard times tuning /proc/sys/net/ipv4/route/* values, with various
crashes of production machines,
I did some investigations...
The rt_check_expire() has a serious problem on machines with large route
caches, and a standard HZ value of 1000.
With default values, ie ip_rt_gc_interval = 60*HZ = 60000 ;
the loop count :
for (t = ip_rt_gc_interval << rt_hash_log; t >= 0;
overflows (t is a 31 bit value) as soon rt_hash_log is >= 16 (65536 slots in
route cache hash table)
Another problem is the fact that this function has close to 0 effect, because
even if ip_rt_gc_interval is changed to 1 HZ,
only 1/300 of the table is scanned every second. And the loop breaks as soon a
jiffie is consumed.
We should adapt the loop count based on the actual number of entries in the
route cache,
and eventually give more 'jiffies' in some pressure cases.
I am experimenting some changes that I will share when ready.
Thank you
Eric Dumazet
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] Use skb_queue_purge, Ralf Baechle DL5RB |
|---|---|
| Next by Date: | [IPV4] Make ipt_REJECT use icmp_send again, Herbert Xu |
| Previous by Thread: | Re: [PATCH] no more rwlock_t inside tcp_ehash_bucket, David S. Miller |
| Next by Thread: | [PATCH] reduce sizeof(struct inet_peer) from 128 to 64 bytes on 64bits architectures, Eric Dumazet |
| Indexes: | [Date] [Thread] [Top] [All Lists] |