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 =
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