Re: condvar wakeups

Saurabh Desai <[email protected]>
Newsgroups gmane.comp.lib.phil
Message-ID <[email protected]>
Ingo Molnar wrote:
> 
> until someone can show some real degradation due to wakeup behavior i'll
> close this issue and wont pursue FUTEX_REQUEUE upstream, it seems to bring
> no benefits.
>  

This patch definitely helps on a 4-way system and it made a hugh
difference
in some of the results. There wasn't much of a problem on a UP and 2-way
systems earlier wrt to pthread_cond_broadcast and 200+ threads, so this 
patch has no impact in such cases. However, on a 4-way and above
systems, it
improves the pthread_cond_broadcast for 200+ threads in a big way.

Here are some of the results on a 4-way:
pingpong test:
./pp -v -n 128 -i 1 -S 32768
With OLD NPTL:
256 threads initialised in 0s.10090ms
128 games completed in 32s.250439ms

With requeue NPTL:
256 threads initialised in 0s.9938ms
128 games completed in 0s.5219ms

Same thing is true for all other cases, where n > 128.

Ulrich's cond-perf test:
There is not much of difference where n is less than 200.
./cond-perf -r 10 -n 200
OLD NPTL: Never completes, its looping somewhere
LinuxThreads: completes in 0m0.085s
requeue NPTL: completes in 0m0.027s

I can't compile this patch for an UP-system, so I don't have any
numbers.
Again, its a big win for 200+ threads, so this patch should go in.

- Saurabh
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.