[LTP] [PATCH] madvise06: wait a bit after madvise() call
Cyril Hrubis
chrubis@suse.cz
Mon Jul 18 16:03:19 CEST 2016
Hi!
> madvise_willneed() only schedules I/O and does not
> wait for completion, so there is possibility for this
> testcase to fail occasionally.
>
> This patch is introducing a small delay and checks the
> effect of madvise on more pages.
Looks good.
What is the reason for using more than one page? Does that increase the
likehood of triggering the issue?
Another idea may be to utilize bitflags from /proc/self/pagemap which
would be non-destructive way to get the present/swapped information.
Then we can do a short loop that polls these flags with much shorter
sleep, but the code would likely end up more complicated than this...
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list