From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 763F5816F8 for ; Fri, 13 Nov 2026 04:26:04 +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 6AD4No0C014399; Fri, 13 Nov 2026 07:23:51 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AD4No0C014399 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="WJstXsBd" Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AD4NabA014372 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Fri, 13 Nov 2026 07:23:36 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AD4NabA014372 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-48e0af48c18so295648f8f.2 for ; Thu, 12 Nov 2026 20:23:36 -0800 (PST) X-Gm-Message-State: APuU4Z/ngFL71PhUDBq3VUYJSqKhSmbfCka+IOJsZ3WJF6qYLc4nRiBw 06gbibxvb/cyQOYt8cQAfseVGoYhH1ty8V3S/4JA//7Pf7P/rsxRRODY8sGkFBEFjYhftE9li08 AVStUwexMa561PKvxzOy2VfeOpsRhL6QqvDaJUucXM6vPHH7NkMPO4Q== X-Gm-Gg: AYBFou0iLh1A3sZykSMXNeGY/zCKBCxP2swombA976jmkvvj38/OSLYpnUiE6qiwhzE f7UJeu4LATzgvd4H2HxkbaP7SQ3M0ITeWjS3ZUjc0RlNfiPqOwfSXk1qKaJeULjcBak8xRzAjlX 5qZxa2cR0XHuS1ewEnw9ibElfk2HQCGVqLThW2ogBHn6H10fds1Tw6fH18myxb2LUh1/kqPRW6Q emyrZwwJHUCEStNc9/0rZQMa1E134lxCiaIXwXZ7iQM9H3PxfzTCd0sjctY8D9rNf54bAf80yto UV7oJoT1WMscv8ahCnJfhF0y8xozyzQEyY5n7pIbPSSRznGbYaC+Vyfb2uh7E582pvzaYAVHebS ggnuexoa6Wgtr8zpwLZ0Gxt57tw== X-Received: by 2002:a05:6000:2602:b0:48e:7476:9205 with SMTP id ffacd0b85a97d-49c71784d80mr2779308f8f.31.1794543816271; Thu, 12 Nov 2026 20:23:36 -0800 (PST) X-Received: by 2002:a05:6000:2602:b0:48e:7476:9205 with SMTP id ffacd0b85a97d-49c71784d80mr2779292f8f.31.1794543815883; Thu, 12 Nov 2026 20:23:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794543815; cv=none; d=google.com; s=arc-20260327; b=Ko7FpuikmDROFAfCxkjbMhP9o5oynCbHehWAtF+SYJFBWK6dhh4yGI34+mLo7BLg7P mDGHd2GuGRLIxcpUMWl9kRiZapRv+JC2tF2+FBGZ9ll0uWfxgtSOf9FdBHlLUq51anfI gZxIEoKdBgDew6ojr2kmB02CD7JUPJskX/cMvtqoeGakGjYEkf45KRbh3VI9xiEJgzDO Aee75XLeHJtR8Ala21qcjetjXxwLg/BmQalp6MfjxS5MdnSeEmWKn984nGwum7OWUs1W dSrKIC7tz8258CIp5wEjSf/q31qElzeh2HsuKMZ4CuoGH6z3DIBr0neP+BncYIUXgvoT NTTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=sS0ys+/Gvxx4h2w3egOlHNmHEYRy+HDP2kO8Z1g7kmY=; fh=WpT6aB7RBAGHZeWZzqAr71yzRFbPTYkPWKsRagLn48Q=; b=pwItKS3GlTfpXAnchhsRUR+6pjjY72R+mpBcJ31LPAL5lRj5W1ppQTM0FJWHN2iAXI WiOkiS39PCCvYgxFE28wi6PNZHnkwZfvkPiqGnmBnzmGUX0yTekAeaOh82kad7pl4/eo kRtnVN23pxdioFOXpr9JlKzI3oFb+D5wGJMkcqlRGfkv8ybjj9CsfscJeC1PBi1zVCgL ws6pHG8P0hURn1Emp7zKjTlNN1MUdeWSCAVvvCk7te31azNh2ufDm/nLyonm8nao0b3f 5pFrBWrf91v7tMQxDv5rZk67cRiX2gGz2B73fCIiDBuEX3x2/iivcuQiClQZ0wOyelVW tU3g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=WJstXsBd; spf=pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=eva.kurchatova@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-49c64b09e86si2974548f8f.368.2026.11.12.20.23.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2026 20:23:35 -0800 (PST) Received-SPF: pass (google.com: domain of eva.kurchatova@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=WJstXsBd; spf=pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=eva.kurchatova@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=sS0ys+/Gvxx4h2w3egOlHNmHEYRy+HDP2kO8Z1g7kmY=; b=WJstXsBdG4W7 FTFjfc5U3MrJRa1ilmY9GW2pxYydO8DMoYbvB7INJrwYIAcD0jkP8/XILRvMfyxL8VAHeA8pKuY5i tBe4trCn6ctxGw8w0mRec+zYBsQ9CTxER7lujTg1ydJZrSFVAMD30FvkjJJTrL3jN32Rg1P3fqo4c SSPHRCqYhEGRpq5Ksp9yptZnrcvbO5zuhwbUvOxHWBRyBNerF9h/o9g+GOT9zk/350Oukyk6vbBVm /5+n694WtxmjmjoVSDqZmUCMc2VXW2X9rfztVQ8LZuzl+r6ZaGJ8tFvtwqPw5ww5obG9yAW/qWxT+ c1UEtxHhvYRARFGnm3C1OA==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=LekKit-T14) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xRikv-00GsIK-2I; Fri, 13 Nov 2026 05:23:32 +0100 From: Eva Kurchatova To: khorenko@virtuozzo.com Date: Fri, 13 Nov 2026 06:20:00 +0200 Message-ID: <20261113042331.517488-4-eva.kurchatova@virtuozzo.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261113042331.517488-1-eva.kurchatova@virtuozzo.com> References: <20261113042331.517488-1-eva.kurchatova@virtuozzo.com> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 3/3] selftests: cgroup: populate the inactive file with read faults 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 memory.numa_migrate migrates asynchronously, so it skips the folios that are under writeback or locked for it when it gets to them. The inactive_disk_file variant dirties 1 GiB of a disk file with write faults, and writeback of that file is still running when the test migrates it, so part of the file can stay on the source node. Populate that file with read faults instead. The file is a hole, so its page cache stays clean and nothing is written back. disk_file keeps writing to its pages while they are migrated and is left as is. Fixes: 3842964f4497 ("selftests: cgroup: test numa migration of lruvecs") https://virtuozzo.atlassian.net/browse/VSTOR-154520 Feature: fix selftests Signed-off-by: Eva Kurchatova --- tools/testing/selftests/cgroup/test_numa_migrate.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/cgroup/test_numa_migrate.c b/tools/testing/selftests/cgroup/test_numa_migrate.c index 12c9bab79d6e..5e9f594ffb9f 100644 --- a/tools/testing/selftests/cgroup/test_numa_migrate.c +++ b/tools/testing/selftests/cgroup/test_numa_migrate.c @@ -588,6 +588,7 @@ static int touch_pages(const char *cgroup, void *arg) volatile uint8_t *ptr; enum memory_type mem_type; bool inactive; + int populate; char tmp = 's'; struct test_context *ctx = arg; int ret = EXIT_SUCCESS; @@ -596,6 +597,9 @@ static int touch_pages(const char *cgroup, void *arg) mem_type = variant->mem_type; inactive = mem_type == MEMORY_TYPE_INACTIVE_FILE || mem_type == MEMORY_TYPE_INACTIVE_ANON; + /* Read faults leave the file clean, so writeback cannot hold pages back */ + populate = mem_type == MEMORY_TYPE_INACTIVE_FILE ? + MADV_POPULATE_READ : MADV_POPULATE_WRITE; numa_bind(src_mask); @@ -624,7 +628,7 @@ static int touch_pages(const char *cgroup, void *arg) } } - if (madvise(mmap_ptr, file_size, MADV_POPULATE_WRITE) < 0) { + if (madvise(mmap_ptr, file_size, populate) < 0) { ksft_perror("failed to populate test mapping\n"); ret = EXIT_FAILURE; goto err_unmap; -- 2.56.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel