<div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 1, 2019 at 4:03 PM Jan Stancek <<a href="mailto:jstancek@redhat.com" target="_blank">jstancek@redhat.com</a>> wrote:</div><div dir="ltr" class="gmail_attr"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Maybe give it few days, so other people can respond, if they like/don't like<br>
going in this direction.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Sure.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Btw, I'm not going to use shared memory here since that probably make things more complicated.</div><div class="gmail_default" style="font-size:small">I guess just do remaining time check in the parent while loop is enough for the two OOM situations</div><div class="gmail_default" style="font-size:small">which I was mentioned in last mail.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">==== mem_test() ======</div><div class="gmail_default" style="font-size:small"> ...</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><span style="white-space:pre-wrap"> </span>if (pid == 0)</div><div class="gmail_default"><span style="white-space:pre-wrap"> </span>child_loop_alloc();</div><div class="gmail_default"><br></div><div class="gmail_default"><span style="white-space:pre-wrap"> </span>/* waits in the loop for all children finish allocating*/</div><div class="gmail_default"><span style="white-space:pre-wrap"> </span>while(pid_count < pid_cntr) {</div><div class="gmail_default"><span style="white-space:pre-wrap"> </span>if (tst_timeout_remaining() < 15)</div><div class="gmail_default"><span style="white-space:pre-wrap"> </span>break;</div><div class="gmail_default"><br></div><div class="gmail_default"><span style="white-space:pre-wrap"> </span>sleep(1);</div><div class="gmail_default"><span style="white-space:pre-wrap"> </span>}</div><div class="gmail_default"><br></div><div class="gmail_default"><span style="white-space:pre-wrap"> </span>if (dowrite) {</div><div class="gmail_default"> pre_free - post_free check... </div><div class="gmail_default"><span style="white-space:pre-wrap"> </span>} else {</div><div class="gmail_default"><span style="white-space:pre-wrap"> </span>...</div><div class="gmail_default"><span style="white-space:pre-wrap"> </span>}</div><div class="gmail_default"><br></div><div class="gmail_default" style="font-size:small"></div><div class="gmail_default" style="font-size:small"> kill children here..</div></div><div><br></div>-- <br><div dir="ltr" class="m_5369772693764969118gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div></div>