From: "Adam J. Richter" <adam@yggdrasil.com>
To: akpm@osdl.org, chrisw@osdl.org
Cc: greg@kroah.com, linux-kernel@vger.kernel.org, maneesh@in.ibm.com
Subject: Re: [Patch] Delete sysfs_dirent.s_count, saving ~100kB on my system
Date: Wed, 1 Dec 2004 18:59:02 -0800 [thread overview]
Message-ID: <200412020259.iB22x2D24700@adam.yggdrasil.com> (raw)
Chris Wright wrote:
>* Andrew Morton (akpm@osdl.org) wrote:
>> That's all well and good, but sysfs_new_dirent() should be using a
>> standalone slab cache for allocating sysfs_dirent instances. That way, we
>> use 36 bytes for each one rather than 64.
>Reasonable, here's a patch (lightly tested). [...]
Great. That way 32-bit architectures should be able to
benefit from some another shrink of sysfs_dirent that I'd like
to do, and it will also help 64-bit architectures (where sysfs_dirent
is still larger than 32 bytes even with my change).
I applied Chris's patch on top of my own (which still
saves about 14kB on my machine and shrinks the source code by 11
lines) and I am running it now. It looks fine to me, although I
haven't looked into making a separate slab cache before. I guess
it's okay that there is no alignment requirement on it for now,
as there are a lot of sysfs_dirent structure and more every day,
and programs that would access these structures frequently would
also probably cause access to a lot of them at the same time (by
scanning the sysfs tree), so inter-processor cache line contention
might be offset by the more efficient utilization of the processor's
cache.
Chris's patch file applied without conflict (there was a
one line offset in fs/sysfs/sysfs.h), so it should be easy to
integrate both patches. Please let me know if there is anything
further I should or can do to help make that happen, as I'd like
to have my fs/sysfs tree in sync before trying to unpin the
struct dirent and struct inode for sysfs directories, as I
expect that to be a more complex patch (and unpin hundreds of kbytes).
__ ______________
Adam J. Richter \ /
adam@yggdrasil.com | g g d r a s i l
next reply other threads:[~2004-12-02 3:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-02 2:59 Adam J. Richter [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-12-01 18:56 Adam J. Richter
2004-12-01 21:07 ` Andrew Morton
2004-12-01 23:51 ` Chris Wright
2004-12-17 23:27 ` Greg KH
2004-12-30 13:34 ` Maneesh Soni
2004-11-23 4:08 Adam J. Richter
2004-11-22 19:17 Adam J. Richter
2004-11-22 22:53 ` Maneesh Soni
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=200412020259.iB22x2D24700@adam.yggdrasil.com \
--to=adam@yggdrasil.com \
--cc=akpm@osdl.org \
--cc=chrisw@osdl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maneesh@in.ibm.com \
/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
all inboxes | Powered by JetHome®