[LTP] [PATCH v3] Add process_madvise01 test

Cyril Hrubis chrubis@suse.cz
Fri Sep 1 14:16:43 CEST 2023


Hi!
> > > +	TST_EXP_EXPR(map_before.swap < map_after.swap,
> > > +		"Most of the memory has been swapped out: %dkB out of %dkB",
> > > +		map_after.swap,
> 
> > Although it's unlikely that map_before.swap will be non-zero we should
> > print the difference here, so I've changed this part to:
> 
> > map_after.swap - map_before.swap
> 
> > And pushed, thanks.
> 
> FYI this new test is failing on current openSUSE Tumbleweed (kernel 6.4.12-1):
> 
> tst_test.c:1559: TINFO: Timeout per run is 0h 00m 30s
> process_madvise01.c:38: TINFO: Allocate memory: 1048576 bytes
> process_madvise01.c:99: TINFO: Reclaim memory using MADV_PAGEOUT
> process_madvise01.c:62: TFAIL: Expect: Most of the memory has been swapped out: 0kB out of 1024kB
> 
> Summary:
> passed   0
> failed   1
> broken   0
> skipped  0
> warnings 0
> 
> Test works well on current Debian unstable with kernel 6.4.11.
> Could you please have a look if it's a test or a kernel bug?

Does the machine where it fails even have any swap?

I suppose that we should check for:

1) CONFIG_SWAP in the kernel .config
2) /proc/meminfo SwapFree: > $pagesize kB

I guess that the madvise kicks off the kernel swapper, but it may take
some time for the memory to be actually swapped.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list