[440/622] lustre: llite: Mark lustre_inode_cache as reclaimable
diff mbox series

Message ID 1582838290-17243-441-git-send-email-jsimmons@infradead.org
State New
Headers show
Series
  • lustre: sync closely to 2.13.52
Related show

Commit Message

James Simmons Feb. 27, 2020, 9:15 p.m. UTC
From: Jacek Tomaka <jacek.tomaka@poczta.fm>

This is required for proper kernel memory available accounting.
Without it memory allocated to lustre_inode_cache appears as
SUnreclaim where in reality it should apper as SReclaimable.
This affect MemAvailable as well (it is lower than it should be).

WC-bug-id: https://jira.whamcloud.com/browse/LU-12313
Lustre-commit: b09e63db24e5 ("LU-12313 llite: Mark lustre_inode_cache as reclaimable")
Signed-off-by: Jacek Tomaka <jacek.tomaka@poczta.fm>
Reviewed-on: https://review.whamcloud.com/35790
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Neil Brown <neilb@suse.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/llite/super25.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/fs/lustre/llite/super25.c b/fs/lustre/llite/super25.c
index afd51a6..38d60b0 100644
--- a/fs/lustre/llite/super25.c
+++ b/fs/lustre/llite/super25.c
@@ -211,7 +211,11 @@  static int __init lustre_init(void)
 	rc = -ENOMEM;
 	ll_inode_cachep = kmem_cache_create("lustre_inode_cache",
 					    sizeof(struct ll_inode_info), 0,
-					    SLAB_HWCACHE_ALIGN | SLAB_ACCOUNT,
+					    SLAB_HWCACHE_ALIGN |
+					    SLAB_RECLAIM_ACCOUNT |
+					    SLAB_ACCOUNT |
+					    SLAB_MEM_SPREAD |
+					    SLAB_ACCOUNT,
 					    NULL);
 	if (!ll_inode_cachep)
 		goto out_cache;