public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Edward Cree <ec429@cantab.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Idea for reducing sysfs memory usage
Date: Tue, 16 Feb 2016 16:38:01 -0800	[thread overview]
Message-ID: <20160217003801.GA3037@kroah.com> (raw)
In-Reply-To: <56C3B4E9.7030207@cantab.net>

On Tue, Feb 16, 2016 at 11:46:49PM +0000, Edward Cree wrote:
> If I'm understanding correctly, when creating a sysfs dir for a kobject, we
> call populate_dir() and create a sysfs file for each of its default_attrs.
> This leads to some memory allocations, which apparently can really add up
> when, for instance, using a large number of netdevices (mostly software
> devices like VLANs and bonds whose sysfs files will probably never actually
> be used anyway).  At netdev1.1, a use case was presented for thousands -
> perhaps even hundreds of thousands - of such netdevices, at which point the
> memory overhead for all those sysfs files becomes quite significant.

Oops, missed this before.  Exactly what is that memory overhead?  Do you
have numbers?

Again, we can easily handle tens of thousands of devices today, hundred
of thousands also probably work fine, I haven't heard of anyone really
needing/wanting them except for odd benchmarks.  If you have a script I
can use to test with, I'd be glad to do so.  I'd also be interested in
the use-case for this type of thing, what is it good for?

But you are going to have to come up with some real numbers to show that
sysfs really is the issue here, and it's not something a bit higher up
the stack.

thanks,

greg k-h

      parent reply	other threads:[~2016-02-17  0:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 23:46 Idea for reducing sysfs memory usage Edward Cree
2016-02-16 23:55 ` Greg Kroah-Hartman
2016-02-17  0:37   ` Edward Cree
2016-02-17  0:44     ` David Ahern
2016-02-17  2:30       ` Greg Kroah-Hartman
2016-02-17  0:47     ` Greg Kroah-Hartman
2016-02-17  0:53       ` David Ahern
2016-02-17  1:26       ` Edward Cree
2016-02-17  2:27         ` Greg Kroah-Hartman
2016-02-17  0:38 ` Greg Kroah-Hartman [this message]

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=20160217003801.GA3037@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=ec429@cantab.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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