<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 31, 2016 at 9:52 PM, Cyril Hrubis <span dir="ltr"><<a href="mailto:chrubis@suse.cz" target="_blank">chrubis@suse.cz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br>
<span class="">> void testoom(int mempolicy, int lite, int retcode, int allow_sigkill)<br>
> {<br>
> + int ksm_run_orig;<br>
> +<br>
> set_global_mempolicy(mempolicy);<br>
><br>
> tst_resm(TINFO, "start normal OOM testing.");<br>
> @@ -224,7 +226,10 @@ void testoom(int mempolicy, int lite, int retcode, int allow_sigkill)<br>
> "skip OOM test for KSM pags");<br>
> } else {<br>
> tst_resm(TINFO, "start OOM testing for KSM pages.");<br>
> + SAFE_FILE_SCANF(cleanup, PATH_KSM "run", "%d", &ksm_run_orig);<br>
> + SAFE_FILE_PRINTF(cleanup, PATH_KSM "run", "1");<br>
> oom(KSM, lite, retcode, allow_sigkill);<br>
> + SAFE_FILE_PRINTF(cleanup,PATH_KSM "run", "%d", ksm_run_orig);<br>
</span> ^<br>
missing space<br>
<br>
Technically the oom() can actually exit the test execution (calls<br>
tst_brkm()) so it would be a bit better if the value was restored in the<br>
test cleanup. But I guess that it's unlikely to happen and we can<br>
proceed with this patch.<br></blockquote><div><br></div><div>hmm, right. To be honest, before I go this way, I took a consideration that if we can enable the ksm in oom*.c codes, but looks like mm library(mem.c) achieves so many functions for the oom test, and it will mix with other oom special test if do like that.<br><br>Anyway, with the patch applied, oom + ksm PASS on kernel-4.4 currently. <br>------------------------------<br>oom01 0 TINFO : start OOM testing for KSM pages.<br>oom01 0 TINFO : expected victim is 1044.<br>oom01 0 TINFO : thread (7f6b8e4df700), allocating 3221225472 bytes.<br>oom01 0 TINFO : thread (7f6b8dcde700), allocating 3221225472 bytes.<br>oom01 0 TINFO : thread (7f6b8bcda700), allocating 3221225472 bytes.<br>oom01 0 TINFO : thread (7f6b8c4db700), allocating 3221225472 bytes.<br>oom01 0 TINFO : thread (7f6b8b4d9700), allocating 3221225472 bytes.<br>oom01 0 TINFO : thread (7f6b8ccdc700), allocating 3221225472 bytes.<br>oom01 0 TINFO : thread (7f6b8d4dd700), allocating 3221225472 bytes.<br>oom01 0 TINFO : thread (7f6b8e4df700), allocating 3221225472 bytes.<br>oom01 0 TINFO : thread (7f6b8bcda700), allocating 3221225472 bytes.<br>oom01 0 TINFO : thread (7f6b8c4db700), allocating 3221225472 bytes.<br>oom01 0 TINFO : thread (7f6b8dcde700), allocating 3221225472 bytes.<br>oom01 0 TINFO : thread (7f6b8ccdc700), allocating 3221225472 bytes.<br>oom01 0 TINFO : thread (7f6b8b4d9700), allocating 3221225472 bytes.<br>oom01 0 TINFO : thread (7f6b8d4dd700), allocating 3221225472 bytes.<br>oom01 5 TPASS : victim signalled: (9) SIGKILL<br>oom01 0 TINFO : set overcommit_memory to 0<br><br></div></div><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Regards,<br></div>Li Wang<br></div><div>Email: <a href="mailto:liwang@redhat.com" target="_blank">liwang@redhat.com</a><br></div></div></div></div></div></div>
</div></div>