Skip to content

Commit 7d10f70

Browse files
Waiman-Longtorvalds
authored andcommitted
fs: Don't need to put list_lru into its own cacheline
The list_lru structure is essentially just a pointer to a table of per-node LRU lists. Even if CONFIG_MEMCG_KMEM is defined, the list field is just used for LRU list registration and shrinker_id is set at initialization. Those fields won't need to be touched that often. So there is no point to make the list_lru structures to sit in their own cachelines. Signed-off-by: Waiman Long <longman@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 1dbd449 commit 7d10f70

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

include/linux/fs.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,11 +1479,12 @@ struct super_block {
14791479
struct user_namespace *s_user_ns;
14801480

14811481
/*
1482-
* Keep the lru lists last in the structure so they always sit on their
1483-
* own individual cachelines.
1482+
* The list_lru structure is essentially just a pointer to a table
1483+
* of per-node lru lists, each of which has its own spinlock.
1484+
* There is no need to put them into separate cachelines.
14841485
*/
1485-
struct list_lru s_dentry_lru ____cacheline_aligned_in_smp;
1486-
struct list_lru s_inode_lru ____cacheline_aligned_in_smp;
1486+
struct list_lru s_dentry_lru;
1487+
struct list_lru s_inode_lru;
14871488
struct rcu_head rcu;
14881489
struct work_struct destroy_work;
14891490

0 commit comments

Comments
 (0)