[Top] [All Lists]

Re: [BUG] overflow in net/ipv4/route.c rt_check_expire()

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: Re: [BUG] overflow in net/ipv4/route.c rt_check_expire()
From: Eric Dumazet <dada1@xxxxxxxxxxxxx>
Date: Fri, 01 Apr 2005 23:05:37 +0200
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20050401122802.7c71afbc.davem@xxxxxxxxxxxxx>
References: <42370997.6010302@xxxxxxxxxxxxx> <20050315103253.590c8bfc.davem@xxxxxxxxxxxxx> <42380EC6.60100@xxxxxxxxxxxxx> <20050316140915.0f6b9528.davem@xxxxxxxxxxxxx> <4239E00C.4080309@xxxxxxxxxxxxx> <20050331221352.13695124.davem@xxxxxxxxxxxxx> <424D5D34.4030800@xxxxxxxxxxxxx> <20050401122802.7c71afbc.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)
David S. Miller a écrit :
On Fri, 01 Apr 2005 16:39:48 +0200
Eric Dumazet <dada1@xxxxxxxxxxxxx> wrote:

Maybe I should make a static sizing, (replace the 256 constant by something 
based on MAX_CPUS) ?

Even for NR_CPUS, I think the table should be dynamically allocated.

It is a goal to eliminate all of these huge arrays in the static
kernel image, which has grown incredibly too much in recent times.
I work often to eliminate such things, let's not add new ones :-)

You mean you prefer :

static spinlock_t   *rt_hash_lock ; /* rt_hash_lock = 
alloc_memory_at_boot_time(...) */

instead of

static spinlock_t rt_hash_lock[RT_HASH_LOCK_SZ] ;

In both cases, memory is taken from lowmem, and size of kernel image is roughly 
the same (bss section takes no space in image)

Then the runtime cost is more expensive in the 'dynamic case' because of the 
extra indirection...


<Prev in Thread] Current Thread [Next in Thread>