[LTP] [PATCH/RFC] tst_process_state_wait: wait for schedstats to settle when state == S
Cyril Hrubis
chrubis@suse.cz
Thu Nov 7 13:15:20 CET 2019
Hi!
> hb->lock is locked at this point, and requeue takes it too, so I'm not
> sure what makes it fail. I've seen testcase fail in at least
> 2 different ways now. Here's the other one:
Here is another theory, some of the processes may be sleeping in a
different place in the kernel, somewhere between the fork() and the
futex(), and hence we think that they have been suspended on the futex
but aren't.
I guess that what we can do is to put a counter in a piece of shared
memory and increment it from each child just before the futex_wait()
call and wait in the parent until the counter reached num_waiters.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list