On Wednesday 08 February 2006 11:34, Eric Dumazet wrote:

> 1) Instead of storing a 2-uple {pointer,generation} (and using 12 or 16 bytes 
> on 64 bits platforms), we could just use a 32 bit quantity 
> [(ifindex<<8)+(gen_number)]

That would add an 2^24 netdevice limit. Someone will sooner or later
run into this.

Also I'm not sure it's worth it just to save 4 bytes. It would cost more
TLB misses too.

> 2) Not easy to not free the devices because their size is variable (see 
> alloc_netdev()) depending on private data for the driver.

you mean reuse?

I guess when you have lots of devices they are very likely to be all
the same size (e.g. all vlan or all PPP) So it would be reasonable to only 
reuse a device with the same size.

Only drawback is that it might be a long search for the right size
if it's at the other end of a long list and there isn't a hash table
or similar.  But I guess that case could be ignored at first because it should 
be 
very unlikely and if it really should be a problem for somebody then some
suitable data structure could be added.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to