public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <teheo@suse.de>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
	linux-kernel@vger.kernel.org,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH 2/3] Sysfs: Allow directories to be populated dynamically
Date: Fri, 30 Oct 2009 11:17:22 +0100	[thread overview]
Message-ID: <4AEABD32.8010509@suse.de> (raw)
In-Reply-To: <20091029192414.GN10555@parisc-linux.org>

Hello, Matthew.

Matthew Wilcox wrote:
>> It feels a bit too convoluted to me.  sysfs is already pretty
>> convoluted and adding yet more convolution would require pretty good
>> justification, so I'm curious about the numbers.
> 
> It is convoluted.  The advantage of this is that we get to create many
> fewer dirents.  I wonder if we can do away with the dirents entirely, and
> have dentries constructed dynamically instead.

I think it's a bit misdirected.  It's probably better to try to reduce
the size of struct sysfs_dirent by tightly packing them and moving out
dynamic part of the data structure into a separate one which is only
allocated while the node is being accessed.  The thing is that large
number of the nodes would require struct sysfs_dirent anyway, so it
would be much more benficial and less convoluted to diet the whole
thing.

In this particular case, the trade off is actually much worse because
sysfs_dirent is being increased but the only one which is seeing any
kind of memory usage drop is the new msi-x code.  Given that there can
be only a handful of msi-x controllers even in a fairly large system,
I don't think memory usage will be reduced in any meaningful way even
on affected systems and if you think about large systems with
thousands and tens of thousands block devices, the bloat in
sysfs_dirent will waste a lot of memory.

Thanks.

-- 
tejun

  reply	other threads:[~2009-10-30 10:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-20  5:47 [PATCH 0/3] Allow sysfs to be dynamically populated Matthew Wilcox
2009-10-20  5:49 ` [PATCH 1/3] Fix updating of named attribute groups Matthew Wilcox
2009-10-29 15:59   ` Tejun Heo
2009-10-29 16:19     ` Matthew Wilcox
2009-10-29 16:24       ` Tejun Heo
2009-10-20  5:50 ` [PATCH 2/3] Sysfs: Allow directories to be populated dynamically Matthew Wilcox
2009-10-29 16:20   ` Tejun Heo
2009-10-29 16:21     ` Matthew Wilcox
2009-10-29 16:28       ` Tejun Heo
2009-10-29 19:24         ` Matthew Wilcox
2009-10-30 10:17           ` Tejun Heo [this message]
2009-10-30 11:14             ` Matthew Wilcox
2009-10-30 16:06               ` Tejun Heo
2009-10-20  5:50 ` [PATCH 3/3] Expose MSI-X interrupts through a dynamically generated sysfs directory Matthew Wilcox
2009-10-20  8:14   ` Américo Wang
2009-10-20  8:26     ` Matthew Wilcox
2009-10-27 17:32       ` Greg KH
2009-10-20  5:52 ` [PATCH 0/3] Allow sysfs to be dynamically populated Matthew Wilcox

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=4AEABD32.8010509@suse.de \
    --to=teheo@suse.de \
    --cc=gregkh@suse.de \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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