[LTP] [PATCH] memcg_lib/memcg_process: Better synchronization of signal USR1
Joerg Vehlow
lkml@jv-coder.de
Tue Nov 26 13:39:11 CET 2019
>> Yes 30 seconds. Why shouldn't that be not acceptable? It is nothing compared
>> to the runtime of other tests.
> I have written a blog post that partly applies to this case, see:
>
> https://people.kernel.org/metan/why-sleep-is-almost-never-acceptable-in-tests
I know where you are coming from and it is basically the same as my own
opinion.
The difference is: When I look at ltp I see a runtime of more than 6
hours, looking at the
controller test alone it is more than 4 hours. This puts 30 seconds into
a very differenet
perspective than looking at only syscall tests. (In the testrun I looked
at it is around 13 minutes).
That is why I don't care about 30 seconds in this case.
>
> So the problem is that sometimes the program has not finished handling
> the first signal and we are sending another, right?
>
> I guess that the proper solution would be avoding the signals in the
> first place. I guess that we can estabilish two-way communication with
> fifos, which would also mean that we would get notified as fast as the
> child dies as well.
Correct. Using fifos is probably a viable solution, but it would require
library work,
because otherwise the overhead is way too big.
Another thing I can think of is extending tst_checkpoint wait to also
watch a process
and stop waiting, if that process dies. This would be the simplest way
to get good
synchronization and get rid of the sleep.
More information about the ltp
mailing list