Messages in this thread Patch in this message | | | From | Cong Wang <> | Subject | [PATCH] kernfs: account kernfs_node_cache as reclaimable | Date | Fri, 26 Jan 2018 14:47:20 -0800 |
| |
Similar to commit df206988e03e ("fs: fuse: account fuse_inode slab memory as reclaimable"), these kernfs nodes are currently included in the unreclaimable slab counts - SUnreclaim in /proc/meminfo. And they are reclaimable too and can be freed by kernfs_evict_inode() via /proc/sys/vm/drop_caches easily.
Mark the slab cache reclaimable.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> --- fs/kernfs/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c index 26dd9a50f383..66a699d06c9a 100644 --- a/fs/kernfs/mount.c +++ b/fs/kernfs/mount.c @@ -411,6 +411,6 @@ void __init kernfs_init(void) kernfs_node_cache = kmem_cache_create("kernfs_node_cache", sizeof(struct kernfs_node), 0, - SLAB_PANIC | SLAB_TYPESAFE_BY_RCU, + SLAB_PANIC | SLAB_TYPESAFE_BY_RCU | SLAB_RECLAIM_ACCOUNT, NULL); } -- 2.13.0
| |