New kernels allocates flctx_cache entries for each locked inode.
If we account memory used for filelock_cache entries it makes sense
to account flctx_cache entries too.

https://jira.sw.ru/browse/PSBM-120694
Signed-off-by: Vasily Averin <[email protected]>
---
 fs/locks.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/locks.c b/fs/locks.c
index 7fd8fc5afc47..0049244a2732 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2801,7 +2801,8 @@ static int __init filelock_init(void)
        int i;
 
        flctx_cache = kmem_cache_create("file_lock_ctx",
-                       sizeof(struct file_lock_context), 0, SLAB_PANIC, NULL);
+                                        sizeof(struct file_lock_context), 0,
+                                        SLAB_PANIC | SLAB_ACCOUNT, NULL);
 
        filelock_cache = kmem_cache_create("file_lock_cache",
                        sizeof(struct file_lock), 0, SLAB_PANIC | SLAB_ACCOUNT, 
NULL);
-- 
2.17.1

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to