From: Richard Kennedy <richard@rsk.demon.co.uk>
To: Dave Chinner <dchinner@redhat.com>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
Matthew Wilcox <matthew@wil.cx>
Subject: fs: why is lru_lock cachline_aligned_in_smp in the middle of super_block?
Date: Mon, 15 Aug 2011 13:26:03 +0100 [thread overview]
Message-ID: <1313411164.1954.18.camel@castor.rsk> (raw)
In commit 09cc9fc7a7c3d872065426d7fb0f0ad6d3eb90fc lru_lock was added to
super_block defined as :-
spinlock_t s_inode_lru_lock ____cacheline_aligned_in_smp;
Due unfortunate placement in my 64 bit config, gcc has to add a lot of
padding to super_block to honour this.
I get 60 bytes before lru_lock & 32 bytes at the end of the structure.
So I was wondering what access pattern are you trying to avoid ?
And could it be prevented by just moving lru_lock and friends to
somewhere else in the structure?
Even if they were at the end and still cacheline aligned then we would
not have that nearly empty cacheline in the middle.
If they are in the best place then at least add a comment to explain why
this needs to be cacheline aligned?
regards
Richard
next reply other threads:[~2011-08-15 12:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-15 12:26 Richard Kennedy [this message]
2011-08-16 2:41 ` fs: why is lru_lock cachline_aligned_in_smp in the middle of super_block? Dave Chinner
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=1313411164.1954.18.camel@castor.rsk \
--to=richard@rsk.demon.co.uk \
--cc=dchinner@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).