selftests/bpf: Retry stat generation in cgroup_iter_memcg - #13311
selftests/bpf: Retry stat generation in cgroup_iter_memcg#13311kernel-patches-daemon-bpf[bot] wants to merge 2 commits into
Conversation
|
Upstream branch: f5b57e9 |
AI reviewed your patch. Please fix the bug or email reply why it's not a bug. In-Reply-To-Subject: |
|
Forwarding comment 5299367838 via email |
e0cf606 to
ce52aea
Compare
|
Upstream branch: f5b57e9 |
3009377 to
1e1e5e7
Compare
ce52aea to
a5710c4
Compare
|
Upstream branch: d82ebfc |
1e1e5e7 to
a2e7714
Compare
a5710c4 to
233ffc0
Compare
|
Upstream branch: ce7c9f6 |
a2e7714 to
f3b244a
Compare
233ffc0 to
5d19d61
Compare
|
Upstream branch: c93cbdb |
f3b244a to
4fb591a
Compare
5d19d61 to
7b509dc
Compare
|
Upstream branch: c93cbdb |
4fb591a to
87f2ccc
Compare
87f2ccc to
70ad61a
Compare
93097fe to
b51acce
Compare
|
Upstream branch: d99bda7 |
70ad61a to
5a78744
Compare
b51acce to
b27c6f9
Compare
|
Upstream branch: 34e0eb7 |
5a78744 to
f53a607
Compare
b27c6f9 to
5d621a7
Compare
|
Upstream branch: 5fe7007 |
f53a607 to
eacc15f
Compare
5d621a7 to
81e4232
Compare
|
Upstream branch: 77877bf |
eacc15f to
10c0976
Compare
81e4232 to
f0e6afe
Compare
|
Upstream branch: adb7719 |
10c0976 to
cd94bd9
Compare
f0e6afe to
7ac20a0
Compare
|
Upstream branch: 6b0835a |
cd94bd9 to
78929d8
Compare
7ac20a0 to
fd7f5fa
Compare
Each cgroup_iter_memcg subtest touches 1024 pages and expects the matching memcg counter to be non-zero. On a host with many CPUs it reads zero instead: test_anon:FAIL:final anon mapped val: actual 0 <= expected 0 memcg stats are cached per-cpu and only become visible once the periodic flusher runs (FLUSH_TIME, 2s), or once pending updates cross MEMCG_CHARGE_BATCH * num_online_cpus(). That threshold is 512 pages at 8 CPUs but 8192 at 128, so a single pass no longer reaches it and bpf_mem_cgroup_flush_stats() returns without flushing anything. Retry the stat generation, sleeping in between, so that a flusher cycle is always covered. Sleep before dropping the mapping, so that a flusher cycle landing in the sleep observes the mapped state. nr_anon_mapped and nr_file_mapped are rmap gauges, and unmapping first would post a matching negative delta for the flusher to aggregate to a net zero. test_file asserts on both nr_file_pages and nr_file_mapped, which have different lifetimes, as page cache pages outlive the mapping. Retry while either one is still zero. Fixes: 6bce6dd ("bpf: selftests: selftests for memcg stat kfuncs") Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
|
Upstream branch: 6ab6a94 |
78929d8 to
160bd7f
Compare
fd7f5fa to
23ff631
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1146343 irrelevant now. Closing PR. |
Pull request for series with
subject: selftests/bpf: Retry stat generation in cgroup_iter_memcg
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1146343