pthread switch (was Odd KSE panic)

Daniel Eischen eischen at vigrid.com
Mon Jul 5 16:55:49 PDT 2004


On Mon, 5 Jul 2004, Julian Elischer wrote:

> On Mon, 5 Jul 2004, Daniel Eischen wrote:
> > 
> > It doesn't matter which thread gets run after the I/O thread
> > calls pthread_cond_signal().  Either way, the I/O thread has
> > to reenter the kernel and wait for the next event.  And that
> > time adds to the latency of the worker thread the _next_ time.
> 
> not assuming that the worker thread tries to see if there is more work
> before it yields.
> 
> All I'm saying is that the app should decide the priority.
> and you agree that it would be quicker in the case of the 
> 1KSE case?

Latency is reduced, but overall throughput(*) is also reduced
because of the extra thread switch for every wakeup.

(*) Assuming that events occur fast enough.

I'll have a look at adding preemption points, but I still have
my doubts that it really matters...

-- 
Dan Eischen



More information about the freebsd-threads mailing list