netdev
[Top] [All Lists]

Re: [PATCH] support for large number of network devices.

To: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH] support for large number of network devices.
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Tue, 13 Jan 2004 23:18:25 -0800
Cc: shemminger@xxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <4004A194.3030602@candelatech.com>
References: <20040113154610.38f5934c.shemminger@osdl.org> <40048BFD.4010303@candelatech.com> <20040113163828.64ec4743.shemminger@osdl.org> <4004A194.3030602@candelatech.com>
Sender: netdev-bounce@xxxxxxxxxxx
On Tue, 13 Jan 2004 17:55:32 -0800
Ben Greear <greearb@xxxxxxxxxxxxxxx> wrote:

> Stephen Hemminger wrote:
> > I have a patch for name hashing, but don't know if it's needed.
> > Even without it I can add 9 thousand bridge entries,
> > and each one takes longer to start the command than add the entry now. 
> 
> Check out the af_packet code.  At least some branches do a
> device lookup by name for each transmitted packet.  One
> method is:  packet_sendmsg_spkt
> 
> packet_sendmsg gets by index, which could also be hashed...
> 
> At one time ifconfig -a was almost un-usable with large numbers
> of devices, but I think it has been improved.  I haven't tried on
> large numbers of devices lately...

I found some other fast-path'ish cases of dev_get_by_name(), one of which
is atalk_rcv()'s handling of IP over DDP packets.

I didn't even search around for __dev_get() and dev_get_by_index() cases.
There are probably some more there.

Therefore, I think it's wise to just do this right from the start and use a 
hash.
Stephen can you test up and submit the netdev name hash patch you have?

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