[PATCH] Speedup nptl/tst-mutex9 and nptl/tst-mutexpi9.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Speedup nptl/tst-mutex9 and nptl/tst-mutexpi9.

Stefan Liebler-2
Hi,

each test runs for 6s. do_test_clock is called three times where it
sleeps for two seconds and is then checking if the child process
was killed by SIGALRM.  The child process tries to lock a mutex
which times out after 0.5s and is setting up alarm(1) before it blocks
due to pthread_mutex_lock.

This patch removes the sleep(2) and reduces the timeout for the first
pthread_mutex_[timed|clock]lock call.
As the nptl tests run in sequence, this patch saves roughly 6s of
runtime for "make check".

Bye,
Stefan

ChangeLog:

        * nptl/tst-mutex9.c (do_test_clock): Remove sleep and
        reduce timeout.

20190911_nptl_tstmutex9.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Speedup nptl/tst-mutex9 and nptl/tst-mutexpi9.

Carlos O'Donell-6
On 9/12/19 8:15 AM, Stefan Liebler wrote:

> Hi,
>
> each test runs for 6s. do_test_clock is called three times where it
> sleeps for two seconds and is then checking if the child process
> was killed by SIGALRM.  The child process tries to lock a mutex
> which times out after 0.5s and is setting up alarm(1) before it blocks
> due to pthread_mutex_lock.
>
> This patch removes the sleep(2) and reduces the timeout for the first
> pthread_mutex_[timed|clock]lock call.
> As the nptl tests run in sequence, this patch saves roughly 6s of
> runtime for "make check".
>
> Bye,
> Stefan
>
> ChangeLog:
>
>     * nptl/tst-mutex9.c (do_test_clock): Remove sleep and
>     reduce timeout.

Same comment as I made with "[PATCH] Speedup various nptl/tst-cancel20 and nptl/tst-cancel21 tests."

--
Cheers,
Carlos.