netdev
[Top] [All Lists]

Re: [PATCH] hashed device lookup (Does NOT meet Linus' sumission policy!

To: greearb@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
Subject: Re: [PATCH] hashed device lookup (Does NOT meet Linus' sumission policy!)
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Sat, 6 Jan 2001 21:40:36 -0800
In-reply-to: <20010107162905.B1804@xxxxxxxxxxxxxxxxxxx> (message from Chris Wedgwood on Sun, 7 Jan 2001 16:29:05 +1300)
References: <3A578F27.D2A9DF52@xxxxxxxxxxxxxxx> <20010107162905.B1804@xxxxxxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
   On Sat, Jan 06, 2001 at 02:33:27PM -0700, Ben Greear wrote:

       I'm hoping that I can get a few comments on this code.  It was
       added to (significantly) speed up things like 'ifconfig -a' when
       running with 4000 or so VLAN devices.  It should also help other
       instances with lots of (virtual) devices, like FrameRelay, ATM,
       and possibly virtual IP interfaces.  It probably won't help
       'normal' users much, and in it's final form, should probably be a
       selectable option in the config process.

Ben, if ifconfig uses /proc/net/dev to list devices, how can your
changes speed up ifconfig?  Andi mentioned in another email how he has
fixed the quadratic behavior in ifconfig, you should check if it fixes
your problem.  Jamal has suggested dumping ifconfig and making a dummy
"ifconfig" which just wrappers around "ip".  I like this idea the most.

Really, what I'm concerned about is what calls dev_get_by_{name,index}
so often and in such critical places that optimizing it makes any
sense?

I don't mind optimizing stuff like this where needed, in fact I'm the
most guilty of this, check out the complex TCP hash tables we have :-)
But if it's only a problem because of poorly implemented user
applications, let's fix the apps instead of adding the complexity to
the kernel.

Later,
David S. Miller
davem@xxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>