linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: ranxiaokai627@163.com
To: hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev,
	shakeel.butt@linux.dev, muchun.song@linux.dev, tj@kernel.org,
	mkoutny@suse.com, shuah@kernel.org, kuba@kernel.org,
	hughd@google.com, akpm@linux-foundation.org
Cc: cgroups@vger.kernel.org, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	ran.xiaokai@zte.com.cn, ranxiaokai627@163.com
Subject: [PATCH 0/2] kselftests: cgroup: fix test_kmem false failures
Date: Tue, 14 Apr 2026 11:05:22 +0000	[thread overview]
Message-ID: <20260414110524.2414-1-ranxiaokai627@163.com> (raw)

From: Ran Xiaokai <ran.xiaokai@zte.com.cn>

This patchset fixes two issues in testing/selftests/cgroup/test_kmem.c
that cause false test failures under certain system configurations.

Patch 1/2 updates the MAX_VMSTAT_ERROR tolerance to account for the
multi-memcg percpu charge cache introduced by commit f735eebe55f8
("memcg: multi-memcg percpu charge cache") with NR_MEMCG_STOCK
(currently 7) slots per CPU, the worst-case discrepancy between
memory.current and memory.stat.percpu has increased.

Patch 2/2 fixes the test_percpu_basic test to account for slab memory
overhead. On systems with few CPUs (<= 4), slab consumption exceeds
percpu usage, causing the test to fail even when the percpu accounting
is working correctly.

Ran Xiaokai (2):
  kselftests: cgroup: update kmem test tolerance for multi-memcg stock
  kselftests: cgroup: account for slab memory in test_percpu_basic

 tools/testing/selftests/cgroup/test_kmem.c | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

-- 
2.25.1




             reply	other threads:[~2026-04-14 11:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-14 11:05 ranxiaokai627 [this message]
2026-04-14 11:05 ` [PATCH 1/2] kselftests: cgroup: update kmem test tolerance for multi-memcg stock ranxiaokai627
2026-04-14 11:05 ` [PATCH 2/2] kselftests: cgroup: account for slab memory in test_percpu_basic ranxiaokai627

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260414110524.2414-1-ranxiaokai627@163.com \
    --to=ranxiaokai627@163.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mkoutny@suse.com \
    --cc=muchun.song@linux.dev \
    --cc=ran.xiaokai@zte.com.cn \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=shuah@kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox