Aside from philosophical arguments, it seems to me that technically,
many devices could be easily supported by the kernel. As someone pointed
out (sorry, deleted the mail), other than the dev_get_by[index/name], there
is one other place, in the IP stack, that ***may*** be called often that
walks the device list.
1) So, if we optimize the dev_get_by_name with some sort of hash or tree,
getting the performance to at least 0(log(N)), where N is the number of
devices, then that should satisfy dev_get_by_name().
2) Optimize the dev_get_by_index the same way (If I do it, I'll probably
try to write some sort of self-adjusting hash table like thing.) A
tree should work just as well. For extra flexibility, if a hashtable
is used, then there can be compile time hints given to size the hash,
or we could allow setting it through either IOCTLs or the procfs.
3) Investigate the linear walk in IP land. One thing I didn't bring up
before: If the IP code needs to walk all 'routable things', then even
if VLANs are not devices, this code will probably need to walk them.
Either way, we need to investigate this, and optimize it if it proves
to be called often, and is possible to optimize.
TODO: Find what this method was so we can track it down.
If these three changes were made, does anyone see any reason to exclude
them from the kernel?
Does anyone know of any other performance bottlenecks?
Any volunteers? I will do it eventually if no one else does it, but it
may be a week or three before I get the time...
Ben Greear (greearb@xxxxxxxxxxxxxxx) http://www.candelatech.com
Author of ScryMUD: scry.wanfear.com 4444 (Released under GPL)