lkml.org 
[lkml]   [2016]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Idea for reducing sysfs memory usage
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

\
 
 \ /
  Last update: 2016-02-17 02:21    [W:0.075 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site