linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fs: why is lru_lock cachline_aligned_in_smp in the middle of super_block?
@ 2011-08-15 12:26 Richard Kennedy
  2011-08-16  2:41 ` Dave Chinner
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Kennedy @ 2011-08-15 12:26 UTC (permalink / raw)
  To: Dave Chinner; +Cc: linux-fsdevel, lkml, Matthew Wilcox

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

 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-16  2:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-15 12:26 fs: why is lru_lock cachline_aligned_in_smp in the middle of super_block? Richard Kennedy
2011-08-16  2:41 ` Dave Chinner

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).