[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100826141045.GA21770@auslistsprd01.us.dell.com>
Date: Thu, 26 Aug 2010 09:10:45 -0500
From: Matt Domsch <Matt_Domsch@...l.com>
To: Greg KH <greg@...ah.com>
Cc: Stephen Hemminger <shemminger@...tta.com>, Narendra_K@...l.com,
netdev@...r.kernel.org, Charles_Rose@...l.com,
Jordan_Hargrave@...l.com, linux-pci@...r.kernel.org
Subject: Re: [PATCH] Add firmware label support to iproute2
On Wed, Aug 25, 2010 at 03:16:28PM -0700, Greg KH wrote:
> On Wed, Aug 25, 2010 at 05:03:23PM -0500, Matt Domsch wrote:
> > libnetdevname needs to be able to look up a (PCI) device by label. It
> > currently does this by glob()ing /sys/class/net/*/device/label to find
> > all network interfaces that have a PCI device label exposed. There can
> > be arbitrarily many network interfaces, making this a very expensive
> > operation.
>
> So you want to add code to the kernel to make userspace have an easier
> 'find' path? I'm all for making stuff easier, but just how "expensive"
> is such an operation today?
it's one newfstatat and one stat for each network interface,
including interfaces for each vlan, which as Stephen had noted,
could be tens of thousands. Just to test, on a system with ~20k vlans
configured across 5 physical interfaces, the glob() took just over 4
minutes. Now, that may not be the typical case, but it does show the
scalability problem Stephen is concerned about.
Thanks also for the patch review. Yes, we'll clean up the items
noted, if we (collectively) come to agreement that this approach to
solve device naming is valid and warranted. From Stephen's other
comments, we're not quite there yet. :-)
--
Matt Domsch
Technology Strategist
Dell | Office of the CTO
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists