[LTP] [PATCH] mem/oom: don't fail if pthread_create hits EAGAIN

Cyril Hrubis chrubis@suse.cz
Thu Nov 26 15:26:12 CET 2015


Hi!
> In a rare situation on system with many CPUs, small RAM
> and overcommit_memory == 2, threads that are already started
> can create memory pressure, that causes pthread_create
> to hit EAGAIN. Don't fail the test, keep going with threads
> that are already spawned.

It took me a while to figure out what are trying to fix, but I think I
understand now.

The thing is that if we have many processors the threads running on
background allocating and faulting memory would counsume available
memory before the for() loop has chance to finish and the
ptread_create() starts to fail with EAGAIN, right?

In that case the fix looks good, acked.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the Ltp mailing list