[LTP] [RFC PATCH] mm: rewrite mtest01 with new API

Jan Stancek jstancek@redhat.com
Fri Mar 1 09:44:12 CET 2019




----- Original Message -----
> On Fri, Mar 1, 2019 at 4:03 PM Jan Stancek <jstancek@redhat.com> wrote:
> 
> Maybe give it few days, so other people can respond, if they like/don't like
> > going in this direction.
> >
> 
> Sure.
> 
> Btw, I'm not going to use shared memory here since that probably make
> things more complicated.
> I guess just do remaining time check in the parent while loop is enough for
> the two OOM situations
> which I was mentioned in last mail.
> 
> ==== mem_test() ======
>         ...
> 
> if (pid == 0)
> child_loop_alloc();
> 
> /* waits in the loop for all children finish allocating*/
> while(pid_count < pid_cntr) {
> if (tst_timeout_remaining() < 15)
> break;
> 
> sleep(1);
> }
> 
> if (dowrite) {
>                 pre_free - post_free check...

This doesn't look very accurate. Other system processes can influence this.

Do we need to check it at all? If a child didn't complete allocation
it's not going to signal parent.

> } else {
> ...
> }
> 
>        kill children here..
> 
> --
> Regards,
> Li Wang
> 


More information about the ltp mailing list