DragonFly BSD
DragonFly bugs List (threaded) for 2006-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Very high CPU usage running growisofs

From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Mon, 18 Sep 2006 17:50:33 +0200
Mail-followup-to: bugs@crater.dragonflybsd.org

On Mon, Sep 18, 2006 at 04:37:37PM +0100, Steve O'Hara-Smith wrote:
> 	I finally got fed up enough with this to try things I don't really
> understand. I found that adding a usleep(10000); before the only call to
> __thread_yield() - which just calls sched_yield() restored the performance
> of growisofs to normal (and yes the DVDs burnt with it still work fine). In
> more detail I turned this loop:

I'm fully aware of it, but the issue is that it changes the original
intention of the code a lot. I never got around to implement an adaptive

> 	Can anyone comment on the sanity or otherwise of this change ?
> Presumably this form of loop - similar to those mentioned in the
> "Threadding issue" thread in July - does not cause similar problems in
> FreeBSD or Linux does anyone understand what the difference is in DragonFly
> that causes it to cause problems here.

The userland scheduler of pthread sees that it has no other runnable
thread and continues the execution. FreeBSD or Linux go to the kernel
and the kernel scheduler most likely decides to switch to a different
process. But in principle, it should show the same behaviour.


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