[LTP] [PATCH] syscalls/madvise06: Fix sporadic not enough RAM TCONFs
Li Wang
li.wang@linux.dev
Wed May 27 13:22:00 CEST 2026
Cyril Hrubis wrote:
> On systems with <= 2GB RAM the test produced sporadic TCONFs. That is
> because even if the test setup does sync() and drops caches the system
> starts fauting in pages immediatelly after caches were dropped. It may
> easily happen that system may fault in a few hundred of MBs of memory
> betwen the write to drop_caches and the time sysinfo() syscall returns.
>
> The correct fix is to use the MemAvailable metric from /proc/meminfo
> that includes both free memory and caches and is more realistic estimate
> of how much memory can be consumed by a test. We even have helper
> functions in the test library so we simply make use of them.
>
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Sounds reasonable.
Reviewed-by: Li Wang <li.wang@linux.dev>
--
Regards,
Li Wang
More information about the ltp
mailing list