[LTP] getrusage03: account for percpu RSS counter batching

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Fri Oct 2 15:40:42 CEST 2026


Hi Nirmoy,

On 2026-10-02, Nirmoy Das wrote:
> getrusage03: account for percpu RSS counter batching

> 	long online_cpus = tst_ncpus();
> 	long batch = MAX(32L, online_cpus * 2);

Medium: On musl, tst_ncpus() counts the calling thread's affinity mask,
so an inherited taskset/cpuset restriction still underestimates the kernel's
global batch even before pinning. With 352 online CPUs, 64 KiB pages and
single-CPU inherited affinity, this chooses 20 MiB rather than 44 MiB and
rejects a valid 270336 KiB result for the 300 MiB allocation. Obtain the
system-wide online count independently of affinity, for example by counting
the CPU ranges in /sys/devices/system/cpu/online.

Verdict - Needs revision

---
Note:

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer


More information about the ltp mailing list