linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] kselftests: cgroup: fix test_kmem false failures
@ 2026-04-14 11:05 ranxiaokai627
  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
  0 siblings, 2 replies; 3+ messages in thread
From: ranxiaokai627 @ 2026-04-14 11:05 UTC (permalink / raw)
  To: hannes, mhocko, roman.gushchin, shakeel.butt, muchun.song, tj,
	mkoutny, shuah, kuba, hughd, akpm
  Cc: cgroups, linux-mm, linux-kselftest, linux-kernel, ran.xiaokai,
	ranxiaokai627

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-14 11:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-14 11:05 [PATCH 0/2] kselftests: cgroup: fix test_kmem false failures ranxiaokai627
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox