linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/3] Fix test_cgroup_iter_memcg issues found during back-porting
@ 2026-02-13  7:23 Hui Zhu
  2026-02-13  7:23 ` [PATCH bpf-next v2 1/3] bpf: Use bpf_core_enum_value for stats in cgroup_iter_memcg Hui Zhu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Hui Zhu @ 2026-02-13  7:23 UTC (permalink / raw)
  To: Johannes Weiner, Michal Hocko, Roman Gushchin, Shakeel Butt,
	Muchun Song, Andrew Morton, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, Shuah Khan, Hui Zhu, JP Kobryn, cgroups,
	linux-mm, linux-kernel, bpf, linux-kselftest

From: Hui Zhu <zhuhui@kylinos.cn>

While back-porting "mm: bpf kfuncs to access memcg data", I
encountered issues with test_cgroup_iter_memcg, specifically
in test_kmem.

These patches are my fixes for the problems I encountered.

Changelog:
v2:
According to the comments of JP Kobryn, added bpf_core_enum_value()
usage in the BPF program to handle cross-kernel enum value differences
at load-time instead of compile-time.
Dropped the mm/memcontrol.c patch.
Modified test_kmem handling: instead of skipping when nokmem is set,
verify that kmem value is zero as expected.
According to the comments of bot, fixed assertion message: changed
"bpf_mem_cgroup_page_state" to "bpf_mem_cgroup_vm_events" for PGFAULT
check.

Hui Zhu (3):
  bpf: Use bpf_core_enum_value for stats in cgroup_iter_memcg
  selftests/bpf: Check bpf_mem_cgroup_page_state return value
  bpf: selftests: Skip kmem test when cgroup.memory=nokmem is set

 .../bpf/prog_tests/cgroup_iter_memcg.c        | 42 +++++++++++++++++++
 .../selftests/bpf/progs/cgroup_iter_memcg.c   | 41 ++++++++++++++----
 2 files changed, 76 insertions(+), 7 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2026-02-16 18:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-13  7:23 [PATCH bpf-next v2 0/3] Fix test_cgroup_iter_memcg issues found during back-porting Hui Zhu
2026-02-13  7:23 ` [PATCH bpf-next v2 1/3] bpf: Use bpf_core_enum_value for stats in cgroup_iter_memcg Hui Zhu
2026-02-16 18:30   ` JP Kobryn (Meta)
2026-02-13  7:23 ` [PATCH bpf-next v2 2/3] selftests/bpf: Check bpf_mem_cgroup_page_state return value Hui Zhu
2026-02-13  7:56   ` bot+bpf-ci
2026-02-13  7:23 ` [PATCH bpf-next v2 3/3] bpf: selftests: Skip kmem test when cgroup.memory=nokmem is set Hui Zhu
2026-02-13  7:56   ` bot+bpf-ci

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