[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Poor condvar performance

On Wed, 2003-11-26 at 04:30, Ingo Molnar wrote:
> On Tue, 25 Nov 2003, Luke Elliott wrote:
> > Ulrich stated that "The best solution is to get requeue working
> > (although two syscalls are made)." I would also appreciate some
> > clarification of this - does it mean that the immediate scheduling of
> > the woken thread would not happen, in a similar way to the hack to
> > sched.c above? Because that seems to be a bad thing.
> requeue means that the waiting thread is directly queued from the condvar
> futex to the mutex futex, without any intermediate scheduling.
> this already happens for cond_broadcast() - but you are using
> cond_signal(), correct?
> 	Ingo

I'm actually using pthread_cond_broadcast() as I may have multiple
consumer threads. However, in this case I do only have one thread. I've
just tried using pthread_cond_signal() and I see the same behaviour;
i.e. very high context switches / sec with the vanilla futex.c and
sched.c, and sensible numbers with the wake_up_all() hacks.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]