From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (unknown [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 496618015B for ; Tue, 15 Sep 2026 17:24:26 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 68FHN6Zc006451; Tue, 15 Sep 2026 20:23:07 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68FHN6Zc006451 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="S4n0Tc0x" Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 68FHN4Rs006415 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 15 Sep 2026 20:23:04 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68FHN4Rs006415 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-47f2de3ba47so3208273f8f.1 for ; Tue, 15 Sep 2026 10:23:04 -0700 (PDT) X-Gm-Message-State: AFuF++nvjpcGC6wopAQf3OgZPVnaI1XZwQaOkPGDSGjd5OlC4VJxER4P l0AyMfynbPofPiW06Tgwni/pdUwmIUfhn/C/0jdb93heMGIqSE1XdUePSll8DyJL1o9skAq3obt 1iMFVyfR4SIToH7XnYhgg6T+al/dKe7Zkh2Kktm9wc44BlwGfA2OK0A== X-Gm-Gg: AYBFou0o+CEGz+wwyVUX1Kdci5MuDnY0pTiJapnpXa+ZQchoYbMWL90YMZ+jpWiT1/Q TlRxycwhDdZ9YxEkTwzNHpJK05cc7AQrLzcY6amwhfsEpo6T6OYj+4qm6yLhtWiPo5NsSG6vHdb OknxHD+BBUFFoLZeRA4NW+SnBVQwtwY5ZX+t4nkHNFJ2234q83+guwqXuBSJhCMKXfVi/uDW9a0 PGwlN23yrTgAJjZDERetFLSD9b1F1BNWZCy3luEKIIYYSw+MDGwS+85wIKvLGDMRToevfD9Pawy OFnjLSIdpObIQTHrBLUpaCL8hzvukOEkKr2CDyFayUQqs0760u8vP3VD68nZZ6ub5Z2hBp6H/Ik Szo+xsCCt77H0HKzUYkk1xtz/PNjzbQ== X-Received: by 2002:a05:6000:25ca:b0:486:f469:e8be with SMTP id ffacd0b85a97d-4870aa0a84fmr2548916f8f.49.1789492984407; Tue, 15 Sep 2026 10:23:04 -0700 (PDT) X-Received: by 2002:a05:6000:25ca:b0:486:f469:e8be with SMTP id ffacd0b85a97d-4870aa0a84fmr2548877f8f.49.1789492983919; Tue, 15 Sep 2026 10:23:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1789492983; cv=none; d=google.com; s=arc-20260327; b=IT0vtgdqJz7VS691UJWfrZlQYTXS3GCxT0w0t4ft2Xkiw3lCco0StTjWsQ495CD6NE cXwHaUUzcWQBzKnNqnApvirpVC09FazYaakK+/aK7siNwOYnPHAmH9n2BG1IXMJN6Y1d MfPvDgbXUyqdPnmxFIXvDmy3AJRAxbWpAed8Qq42AtkKXgiMls7yxRDGJ3DJs/u79JaD h22VDRCBU3mUratWpbczck3YVZ2qj3ifbBuO9tfHY56XHHnKtRnb6OjQPt5D490iKelE xOy6EyHhc3w4xLD0bb4y/NftzrjNPSh63MdHJwifx25kk6nSrqklYg+hKmI62rZvUwTY UtnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=lo20zQtSgyA6GkH5Us2OUVTU/h9MI+pNj5s+D2VZYxs=; fh=QQvtjDaAlLft5IR2jnjma4lVp8TaaKU12WD0fWdFifQ=; b=OOv8h0mAwk+zrlCcfjO/qXABQreoA85OhvM8EUSwZhGE/i4iqFqHocgvvZahIwAQhs TfJ8Ww4O0WSjinauEIYcMyjNv2r+W0VmcYd1GRFTM1gnYtYgpPRUEvo0/awWZ5yY+DL6 2gfRC+T8Qzbn2KChdKj+4/8t566+J4dIX9TPviDrXap2bA05NrkIE5LQRFZzPu+qA3Qb NFRTaau9P++j5R1KZ94yoe0DclM1w+cG6zCUGY/cXp7TO60bOiQBacRA2FoBdYPPHAQu b9UucuW0VqfAE1Xw1RBCEe1ZSWRK1DFVkntsjZT1yZpo7y9qBG5P2eS5b22R7C3GCIH2 KDMw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=S4n0Tc0x; spf=pass (google.com: domain of vladimir.riabchun@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=vladimir.riabchun@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-4870bf65456si373420f8f.361.2026.09.15.10.23.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2026 10:23:03 -0700 (PDT) Received-SPF: pass (google.com: domain of vladimir.riabchun@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=S4n0Tc0x; spf=pass (google.com: domain of vladimir.riabchun@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=vladimir.riabchun@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=lo20zQtSgyA6GkH5Us2OUVTU/h9MI+pNj5s+D2VZYxs=; b=S4n0Tc0x9uYl wYonr8inxpLCZoX4aA708fsPgKxm7AKUPq0MkeL9Wn+h2PLND6LlFzbj4VfxR/Gt8qVuRK5IO++63 qM+Xo8zCP0FR0JbseC5Sd4cQkUSbXClWFAv1iOfp60m553NGldjv243TVvQc3gShMvVIe3y04eQ3h LH90bE2UCSto/ZUnLM32A/rqBgqFumPv9QAXvbmRxsdRjIg8o+KDhqJdOjpS0b+rrmE84TxKL4ckc FPVfQMrBLaCtinfkctR7F/ZWRQI/qnIj6mKWECCqbZcANLRo5zQRziRhQpxwVzD9HZLgOiqnStpGd 3ybW2JG677oUwLBA4par2A==; Received: from [130.117.225.5] (helo=dev012.aci.vzint.dev) by relay.virtuozzo.com with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x6WpK-00GSrt-1Q; Tue, 15 Sep 2026 19:22:53 +0200 From: Vladimir Riabchun To: devel@openvz.org Date: Tue, 15 Sep 2026 17:22:28 +0000 Message-ID: X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 X-OZ-Fwd: true Subject: [Devel] [PATCH VZ10 v9 0/8] Add per-VE failcount support X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org 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 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@openvz.org https://lists.openvz.org/mailman/listinfo/devel