David S. Miller a écrit :
On Thu, 17 Mar 2005 20:52:44 +0100
Eric Dumazet <dada1@xxxxxxxxxxxxx> wrote:
- Move the spinlocks out of tr_hash_table to a fixed size table : Saves a lot of memory (particulary on UP)
If spinlock_t is a zero sized structure on UP, how can this save memory
on UP? :-)
Because I deleted the __attribute__((__aligned__(8))) constraint on struct
So sizeof(struct rt_hash_bucket) is now 4 instead of 8 on 32 bits architectures.
May I remind you some people still use 32 bits CPU ? :-)
By the way I have an updated patch... surviving very serious loads.
Anyways, I think perhaps you should dynamically allocate this lock table.
Maybe I should make a static sizing, (replace the 256 constant by something
based on MAX_CPUS) ?
Otherwise it looks fine.