From: Vladimir Davydov <vdavydov@parallels.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] fs: super: do not cacheline align s_{inode,dentry}_lru
Date: Mon, 19 Jan 2015 15:29:23 +0300 [thread overview]
Message-ID: <1421670563-28228-1-git-send-email-vdavydov@parallels.com> (raw)
super_block->s_{inode,dentry}_lru were made cacheline aligned, because
the list_lru struct had a spinlock and a list embedded to it and
therefore could be actively modified.
Today, struct list_lru is, in fact, read-only: the lists and locks live
in list_lru_node's, which list_lru points to. The list_lru_node struct
is already cacheline aligned by definition.
So let us drop the cacheline aligned annotation in order not to waste
space in struct super_block.
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
---
include/linux/fs.h | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 0bd9669ce91d..790e534adbc7 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1309,12 +1309,9 @@ struct super_block {
struct workqueue_struct *s_dio_done_wq;
struct hlist_head s_pins;
- /*
- * Keep the lru lists last in the structure so they always sit on their
- * own individual cachelines.
- */
- struct list_lru s_dentry_lru ____cacheline_aligned_in_smp;
- struct list_lru s_inode_lru ____cacheline_aligned_in_smp;
+ struct list_lru s_dentry_lru;
+ struct list_lru s_inode_lru;
+
struct rcu_head rcu;
/*
--
1.7.10.4
reply other threads:[~2015-01-19 12:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1421670563-28228-1-git-send-email-vdavydov@parallels.com \
--to=vdavydov@parallels.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).