Andi Kleen wrote: > > Ben Greear writes: > > > > Adding the hashed lookup for devices took the exponential curve out of > > ip and ifconfig's performance, btw. > > And fixing the ifconfig user data structures took it also. > Probably just ip needs similar tuning. > No need to add the name lookup hash table to the kernel. ip is still much faster than ifconfig for large numbers of devices (say, 1000+). If I remember correctly, it takes about 20 seconds to do an 'ip addr show' for 4000 interfaces. Most of that time is in the kernel. This may be acceptable, but I know it can be made faster with hashing and/or some other clever way... If you are interested in exact numbers, I (or you) can run the vlan_test.pl script in my vlan distribution (also attached). It currently has the ifconfig -a part commented out because it makes the test script take too long. The script can also generate output ready to be fed into gnuplot. > > Perhaps it would be best if you could post your current patch without > these hash tables, so that it can be properly reviewed and hopefully > merged then. Agreed. It is attached. I have placed 'TODO' comments in the patch where I had questions, I would especially like feedback on these areas of the code... > > -Andi -- Ben Greear President of Candela Technologies Inc http://www.candelatech.com ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear