public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Matt Domsch <Matt_Domsch@Dell•com>
To: Greg KH <greg@kroah•com>
Cc: Stephen Hemminger <shemminger@vyatta•com>,
	Narendra_K@Dell•com, netdev@vger•kernel.org,
	Charles_Rose@Dell•com, Jordan_Hargrave@Dell•com,
	linux-pci@vger•kernel.org
Subject: Re: [PATCH] Add firmware label support to iproute2
Date: Thu, 26 Aug 2010 09:10:45 -0500	[thread overview]
Message-ID: <20100826141045.GA21770@auslistsprd01.us.dell.com> (raw)
In-Reply-To: <20100825221628.GA24502@kroah.com>

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

  reply	other threads:[~2010-08-26 14:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-12 17:35 [PATCH] Add firmware label support to iproute2 Narendra K
2010-08-12 18:10 ` Stephen Hemminger
2010-08-12 18:12 ` Stephen Hemminger
2010-08-13 12:36   ` Narendra_K
2010-08-18 21:41     ` Stephen Hemminger
2010-08-19 21:33       ` Matt Domsch
2010-08-19 21:53         ` Stephen Hemminger
2010-08-19 22:18           ` Matt Domsch
2010-08-25 22:03           ` Matt Domsch
2010-08-25 22:16             ` Greg KH
2010-08-26 14:10               ` Matt Domsch [this message]
2010-08-26  0:16             ` Stephen Hemminger
2010-08-26 15:01               ` Matt Domsch
2010-08-26 15:17                 ` Loke, Chetan
2010-08-26 15:21                   ` Stephen Hemminger
2010-08-26 15:38                     ` Loke, Chetan
2010-08-27  7:54                       ` Kay Sievers
2010-08-26 16:38                 ` Matt Domsch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100826141045.GA21770@auslistsprd01.us.dell.com \
    --to=matt_domsch@dell$(echo .)com \
    --cc=Charles_Rose@Dell$(echo .)com \
    --cc=Jordan_Hargrave@Dell$(echo .)com \
    --cc=Narendra_K@Dell$(echo .)com \
    --cc=greg@kroah$(echo .)com \
    --cc=linux-pci@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=shemminger@vyatta$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox