mem/lib: skip oom(KSM) for lite == 1 (single TESTMEM+MB allocation)
We occasionally catch errors like:
oom03 0 TINFO : start OOM testing for KSM pages.
oom03 0 TINFO : expected victim is 3490.
oom03 6 TFAIL : mem.c:163: victim unexpectedly ended with retcode: 0, expected: 12
oom03 0 TINFO : set overcommit_memory to 0
The issue occurred when child_alloc() ran with lite == 1, meaning it made
only single TESTMEM+MB allocation and returned 0. That's not what oom03
expects as it sets 'limit_in_bytes = TESTMEM' via cgroup. The cause is
presumably that KSM scan merged some allocated pages before child could
hit OOM.
This patch will skip oom(KSM) when lite == 1. At present this applies
only to oom03 testcase.
Signed-off-by: Li Wang <liwang@redhat.com>
Acked-by: Jan Stancek <jstancek@redhat.com>
1 file changed