Subject: Re: Current kernels and power consumption
To: Andrew Doran <ad@netbsd.org>
From: Juan RP <juan@xtrarom.org>
List: current-users
Date: 09/27/2007 01:00:59
On Wed, 26 Sep 2007 23:55:29 +0100
Andrew Doran <ad@netbsd.org> wrote:

> My system uses those and it also has the problem.

Right, I checked with another system that has MONITOR.

> So I looked at this and the problem is that MD code idles only if the
> 'need resched' flag on the CPU is clear. If the flag is set it returns to
> the idle loop, and the flag is usually cleared in mi_switch(). The idle
> loop will not enter mi_switch() if there are no jobs in the run queues
> for the current CPU. So sometimes the flag doesn't get cleared, and they
> end up spinning. The fix is a bit tricky since there are a few different
> requirements at play. I'm looking into it at the moment.

It's cool that you found the real reason, thanks.

-- 
Juan Romero Pardines	- The NetBSD Project
http://plog.xtrarom.org	- NetBSD/pkgsrc news in Spanish