From: Matthew Wilcox <matthew@wil.cx>
To: Nick Piggin <npiggin@suse.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Dave Hansen <haveblue@us.ibm.com>
Subject: Re: [patch 1/2] fs: mnt_want_write speedup
Date: Tue, 10 Mar 2009 08:48:57 -0600 [thread overview]
Message-ID: <20090310144857.GX25995@parisc-linux.org> (raw)
In-Reply-To: <20090310143718.GB15977@wotan.suse.de>
On Tue, Mar 10, 2009 at 03:37:18PM +0100, Nick Piggin wrote:
> costly, unfortunately). It results in about 900 bytes smaller code too. It
> does increase the size of a vfsmount, however.
Only on 64-bit SMP systems, and then only by four bytes. And, best of
all, you can fix that if you care. Look at this:
/* --- cacheline 1 boundary (64 bytes) --- */
struct list_head mnt_child; /* 64 16 */
int mnt_flags; /* 80 4 */
/* XXX 4 bytes hole, try to pack */
const char * mnt_devname; /* 88 8 */
struct list_head mnt_list; /* 96 16 */
struct list_head mnt_expire; /* 112 16 */
So move mnt_flags to later in the struct (after the pointers), and move
> +#ifdef CONFIG_SMP
> + int *mnt_writers;
> +#else
> + int mnt_writers;
> +#endif
to be with the other pointers. Bonus points for putting it between
struct mnt_namespace * mnt_ns; /* 184 8 */
and
int mnt_id; /* 192 4 */
so that it doesn't become a new 4-byte hole for those incredibly common
64-bit uniprocessor builds. *cough*.
--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
next prev parent reply other threads:[~2009-03-10 14:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-10 14:37 [patch 1/2] fs: mnt_want_write speedup Nick Piggin
2009-03-10 14:38 ` [patch 2/2] fs: introduce mnt_clone_write Nick Piggin
2009-03-10 14:55 ` Matthew Wilcox
2009-03-10 15:08 ` Nick Piggin
2009-03-10 14:48 ` Matthew Wilcox [this message]
2009-03-10 15:03 ` [patch 1/2] fs: mnt_want_write speedup Nick Piggin
2009-03-10 15:31 ` Nick Piggin
2009-03-11 22:11 ` Dave Hansen
2009-03-12 4:13 ` Nick Piggin
2009-03-18 19:13 ` Dave Hansen
2009-04-02 18:22 ` Nick Piggin
2009-04-02 18:37 ` Dave Hansen
2009-04-02 20:31 ` Christoph Hellwig
2009-04-03 1:29 ` Nick Piggin
2009-04-02 18:43 ` Al Viro
2009-04-02 18:48 ` Al Viro
2009-04-02 19:08 ` Dave Hansen
2009-04-03 10:31 ` Al Viro
2009-04-03 1:31 ` Nick Piggin
2009-04-02 18:08 ` Andrew Morton
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=20090310144857.GX25995@parisc-linux.org \
--to=matthew@wil.cx \
--cc=akpm@linux-foundation.org \
--cc=haveblue@us.ibm.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).