The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh8-4.18.0-240.1.1.vz8.5.18 ------> commit 2b164a669b9f4bb2e16fddd8b11217ceadd10d60 Author: Vasily Averin <v...@virtuozzo.com> Date: Tue Apr 20 19:35:01 2021 +0300
memcg: Enable accounting for signals User can send signals to another processes and force kernel to allocate memory for 'struct sigqueue' objects. Number of signals is restricted by RLIMIT_SIGPENDING per-task resource limit, though alive signals can consume significant piece of memory. It makes sense to account for these allocations to restrict the host's memory consumption from inside the memcg-limited container. Old virtuozzo versions accounted this memory, but it was lost during vz7 rebase. https://jira.sw.ru/browse/PSBM-128624 Signed-off-by: Vasily Averin <v...@virtuozzo.com> --- kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/signal.c b/kernel/signal.c index 171f7496f811..aa8025687930 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -4354,7 +4354,7 @@ void __init signals_init(void) { siginfo_buildtime_checks(); - sigqueue_cachep = KMEM_CACHE(sigqueue, SLAB_PANIC); + sigqueue_cachep = KMEM_CACHE(sigqueue, SLAB_PANIC | SLAB_ACCOUNT); } #ifdef CONFIG_KGDB_KDB _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel