From: Richard Kennedy <richard@rsk.demon.co.uk>
To: Eric Sandeen <sandeen@redhat.com>
Cc: Theodore Ts'o <tytso@mit.edu>,
lkml <linux-kernel@vger.kernel.org>,
Andreas Dilger <adilger.kernel@dilger.ca>,
linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: remove alignment padding from ext4_inode_info on 64 bit builds
Date: Sat, 21 Aug 2010 13:31:38 +0100 [thread overview]
Message-ID: <1282393898.1978.18.camel@castor.rsk> (raw)
In-Reply-To: <4C6EE173.3030204@redhat.com>
On Fri, 2010-08-20 at 15:11 -0500, Eric Sandeen wrote:
> Richard Kennedy wrote:
> > Reorder structure ext4_inode_info to remove 16 bytes of alignment
> > padding on 64 bit builds. This shrinks its size from 904 to 888 bytes
> > with (CONFIG_EXT4_S_XATTR=y && CONFIG_QUOTA=n).
> >
> > This will allow this structure to use one fewer cache lines.
> >
> > Also change type of i_delalloc_reserved_flag to bool to better reflect
> > its usage.
> >
> > compiled & tested on x86_64
>
>
> Looks good to me; there is still a bit of padding at the end:
>
> qsize_t i_reserved_quota; /* 864 8 */
> struct list_head i_completed_io_list; /* 872 16 */
> spinlock_t i_completed_io_lock; /* 888 4 */
>
> /* XXX 4 bytes hole, try to pack */
>
> /* --- cacheline 14 boundary (896 bytes) --- */
> ext4_io_end_t * cur_aio_dio; /* 896 8 */
> tid_t i_sync_tid; /* 904 4 */
> tid_t i_datasync_tid; /* 908 4 */
>
>
> but it wouldn't save a cacheline anyway...
>
> -Eric
>
Thanks Eric, yes there is padding but we don't have anything to fill the
hole with :(
If it becomes important to save space, i_state_flags seem to be unused
in ext4 so we could possibly drop that.
With my patch applied, under slub I'm getting one more object per slab
in the ext4_inode_cache
[2.6.35] 17 objects of 960 bytes -- 4 pages per slab
[+patch] 18 objects of 896 bytes -- 4 pages per slab
So I guess that is where most of the write test performance improvement
came from.
regards
Richard
next prev parent reply other threads:[~2010-08-21 12:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-18 15:08 [PATCH] ext4: remove alignment padding from ext4_inode_info on 64 bit builds Richard Kennedy
2010-08-20 20:11 ` Eric Sandeen
2010-08-21 12:31 ` Richard Kennedy [this message]
2010-08-21 16:41 ` Eric Sandeen
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=1282393898.1978.18.camel@castor.rsk \
--to=richard@rsk.demon.co.uk \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.