[Devel] [PATCH RHEL8 COMMIT] memcg: enable memory accounting for flctx_cache
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Sep 30 17:25:37 MSK 2020
The commit is pushed to "branch-rh8-4.18.0-193.6.3.vz8.4.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-193.6.3.vz8.4.9
------>
commit 3389f803126536d8a84c6ea667f56ad63a49e59a
Author: Vasily Averin <vvs at virtuozzo.com>
Date: Wed Sep 30 17:25:37 2020 +0300
memcg: enable memory accounting for flctx_cache
New kernels allocate 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 <vvs at virtuozzo.com>
---
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);
More information about the Devel
mailing list