Re: [PATCH v1] pipe13: Scale child reap window with LTP_TIMEOUT_MUL
Stephen Bertram via ltp <[email protected]>
| Newsgroups | gmane.linux.ltp |
|---|---|
| Message-ID | <CAD_=S2m-XRaiUKeAEwLW4Jw9w6=reFWYbPUAm7JfSmQ1ogbX5Q@mail.gmail.com> |
Hi Andrea, When isolated, I can reproduce the issue, always with the 100 scenario, on a debug kernel. The debug kernel I use has locking and kmemleak active which slows performance greatly. As for the scaling, LTP_TIMEOUT_MUL will allow users to scale larger as needed, so I don't think the initial time, 1s, is an issue with the implementation. It keeps it as before, without using the multiple, but now allows us to incorporate the multiple for longer wait times if needed. If you think we should start higher I could, but when I run this test without even using the variable multiplier, it works fine because tst_multiply_timeout also adds a 4x multiple for debug kernels. Thank you for the suggestion and I will make changes to work with TST_RETRY_FN_EXP_BACKOFF(). thanks, stephen He/His/Him On Mon, Jul 13, 2026 at 5:11 AM Andrea Cervesato <[email protected]> wrote: > Hi Stephen, > > > The post-close wait used a fixed 1000000 us cap on exponential backoff > > (~524 ms total). Scale that cap with tst_multiply_timeout() so debug > > kernels and LTP_TIMEOUT_MUL apply, fixing failures under parallel > > Kirk workers without changing default behavior on non-debug systems. > > > > Before (only with case 100): > > > > pipe13.c:50: TINFO: Creating 100 child processes > > pipe13.c:81: TINFO: pid 435007 still sleeps > > ... > > pipe13.c:81: TINFO: pid 435300 still sleeps > > pipe13.c:89: TFAIL: Closed pipe didn't wake up everyone > > The list varied but sometimes up to 20 would remained asleep. > > > > After using tst_multiply_timeout(), test passes. > > > > The failure before would happen, when using 4 paralell workers > > on a debug kernel, about 1 to 2 times when iterated 5 times. > > With the addition of the function, under the same conditions, > > it has not failed in 100 iterations. > > > > Signed-off-by: Stephen Bertram <[email protected]> > > --- > > testcases/kernel/syscalls/pipe/pipe13.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/testcases/kernel/syscalls/pipe/pipe13.c > b/testcases/kernel/syscalls/pipe/pipe13.c > > index 5d76e1f00..cf1ccbcbc 100644 > > --- a/testcases/kernel/syscalls/pipe/pipe13.c > > +++ b/testcases/kernel/syscalls/pipe/pipe13.c > > @@ -44,6 +44,7 @@ static void verify_pipe(unsigned int n) > > int ret; > > unsigned int i, cnt = 0, sleep_us = 1, fail = 0; > > unsigned int child_num = tcases[n]; > > + unsigned int sleep_us_cap = tst_multiply_timeout(1000) * 1000U; > > Even better: we can create a function to reap children and verify > if they are completed while counting them. > Then we can use TST_RETRY_FN_EXP_BACKOFF() on it. > > The problem is that we are waiting a fixed amount of time (~1s) that > is not enough when system is overloaded. > > Most likely, when you are calling kirk parallel execution, other tests > are overloading the system and this test fails accordingly. > > Regards, > -- > Andrea Cervesato > SUSE QE Automation Engineer Linux > [email protected] > > -- Mailing list info: https://lists.linux.it/listinfo/ltp