[Devel] [PATCH VZ10 v9 0/8] Add per-VE failcount support
Vasileios Almpanis
vasileios.almpanis at virtuozzo.com
Wed Sep 16 15:30:19 MSK 2026
> This patchset introduces per-VE failcount support.
> We have several resources, that have per-VE limits,
> the users might want to know what limit hits make
> operations fail.
>
> - Patch 1 is cosmetic, nothing special.
> - Patches 2-4 change mount number and limit processing,
> unifying it with other resources. VE selftest is updated
> in patch 3.
> - Patch 5 greatly reduces the amount of copy-pasted code
> by introducing some useful macros.
> - Patch 6 adds per-VE failcount file.
> - Patch 7 fixes kernel log leak to containers from interrupts.
> - Patch 8 introduces new VE selftest, that checks mounts
> accounting, limits and failcount updates.
>
> NOTE: for running new selftest this change should be applied on
> top of "[PATCH VZ10 v2 0/3] Improvements for ve selftests" patchset.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-135520
>
LGTM. Note for Kostya maybe apply patch 7 before patch 6 so if we bisect
we won't hit a step where logs are leaked to random CTs.
> Changes since v8:
> - Added new patch 7 to fix logs leakage from interrupts.
> We are fine if we miss some failure logs in container
> dmesg - CT can check failcounts anyway, and bringing
> new ratelimited printks with specified VE is too hard
> for such a small thing.
> - Selftest in patch 8 got major rework:
> 1. Correct mmap error handling.
> 2. Dropped mnt_cost value. Let's force 1, it is expected
> value in fresh mount+VE namespaces.
> 3. Proper solution for pending mount destructions. It used
> to be just sleep(1) which may not be enoght on loaded
> machines. Instead, issue rcu_barrier and wait on mnt_avail_nr.
> Since we forced mnt_cost == 1, it know precisely what the
> new value should be.
>
> Vladimir Riabchun (8):
> ve/ve.{h,c}: Farewell to spaces as indents
> ve/fs: Rework per-ve mount count
> selftests/ve: Update ve_ns_owner_test
> ve: Move from global VE mounts limit to per-VE limit
> ve/ve.c: Generate VE resource accessors using macros
> ve: Introduce per-VE failcount
> ve/printk: Don't use ve log outside task context
> selftests/ve: Add mount accounting selftest
>
> fs/aio.c | 1 +
> fs/namespace.c | 80 ++-
> include/linux/ve.h | 35 +-
> kernel/bpf/syscall.c | 1 +
> kernel/printk/printk.c | 7 +-
> kernel/ve/ve.c | 277 ++++-----
> kernel/ve/veowner.c | 19 -
> net/core/dev.c | 10 +-
> net/core/neighbour.c | 3 +-
> net/core/net_namespace.c | 4 +-
> tools/testing/selftests/ve/.gitignore | 1 +
> tools/testing/selftests/ve/Makefile | 1 +
> .../selftests/ve/ve_mount_accounting_test.c | 550 ++++++++++++++++++
> tools/testing/selftests/ve/ve_ns_owner_test.c | 37 +-
> tools/testing/selftests/ve/ve_selftest.h | 21 +
> 15 files changed, 822 insertions(+), 225 deletions(-)
> create mode 100644 tools/testing/selftests/ve/ve_mount_accounting_test.c
>
> --
> 2.47.1
>
> _______________________________________________
> Devel mailing list
> Devel at openvz.org
> https://lists.openvz.org/mailman/listinfo/devel
Reviewed-by: Vasileios Almpanis <vasileios.almpanis at virtuozzo.com>
--
Vasileios Almpanis <vasileios.almpanis at virtuozzo.com>
More information about the Devel
mailing list