This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Speedup various nptl/tst-mutex5 tests.


On 9/12/19 8:16 AM, Stefan Liebler wrote:
> Hi,
> 
> each of these tests - tst-mutex5, tst-mutex5a, tst-mutexpi5
> and tst-mutexpi5a - runs for 6s.
> 
> do_test_clock is called three times, which tries to lock the mutex
> which times out after 2 seconds.
> 
> This patch reduces the timeout to 0.3 seconds which leads to a
> runtime of roughly 0.9s for one tst-mutex5... invocation.
> As the nptl tests run in sequence, this patch saves roughly 20s of
> runtime for "make check".
> 
> Bye,
> Stefan
> 
> ChangeLog:
> 
>     * nptl/tst-mutex5.c (do_test_clock): Reduce timeout.

Why is it safe to wait 0.3 seconds instead of 2 seconds?

Is the timeout being used in place of synchronization elsewhere?

We need a comment specifying if it's safe to lower the timeout
even further.

-- 
Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]