Messages in this thread | | | Date | Tue, 08 Nov 2005 14:54:39 +1100 | From | Nick Piggin <> | Subject | Re: Database regression due to scheduler changes ? |
| |
linux-os (Dick Johnson) wrote:
> > Can you change sched_yield() to usleep(1) or usleep(0) and see if > that works. I found that in recent kernels sched_yield() just seems > to spin (may not actually spin, but seems to with a high CPU usage). >
I've told you that it *does* spin and always has. Even with 2.4 kernels. In fact, it is *specified* to spin, anything else would be a bug.
Caveat: it also yields the CPU, but only if there is another runnable task with a higher priority (which is meaningless between SCHED_OTHER tasks, though we try to do something sane there too).
Secondly, Brian actually pinpointed the source of the regression and it is not sched_yield(), nor has sched_yield changed since the regression. So wouldn't this just be a wild goose chase.
Nick
-- SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |