An issue with powerd..
kostikbel at gmail.com
Fri Dec 28 09:06:03 PST 2007
On Thu, Dec 27, 2007 at 02:49:57PM -0500, John Baldwin wrote:
> So I've had some issues where I get weird hangs when I run with powerd enabled
> on my laptop and I think I've finally tracked it down. Note that this is on
> an older current with the older EC code, but the design flaw in powerd is
> still relevant even if the new EC code makes my laptop happier (I'm trying to
> update my laptop to more recent HEAD, but there's some weird scheduling bug
> that I haven't fixed yet in newer stuff).
> Anyways, I was trying to debug the weird hangs I had when running with powerd
> (machine would go unresponsive and fans would spin up, and after a variable
> number of seconds it would come back and all the pending input (mouse
> movements, keypresses, etc.) would be processed). I added some code to track
> how long it takes for GPE's to run that would print out on the console if one
> took more than 750ms as I had a feeling that something with ACPI was making
> the system busy.
> It was also far worse in console mode than in X. In console mode I found that
> sometimes the system would never "come back".
> So I was running in console mode recently with my timing patches and noticed
> that when it hung it started warning about GPE events taking several
> _seconds_ to process, e.g. 2-3 seconds, or in some cases up to _30_ seconds.
> So, my theory is that powerd has lowered my CPU all the way down to 100mhz
> (easy to reproduce in non-X, just let the box sit with no apps running) and
> that for some reason the machine ends up in a "GPE storm" where it is
> spending all its time handling GPE's and never has any CPU left for userland
> apps (due to being at 100mhz). The problem then is that powerd never runs to
> bump my CPU up to some reasonable speed.
> In fact, anytime a completely idle box suddently gets a lot of kernel work
> (e.g. a sudden flow of packets) it could in theory end up trying to handle
> all this work at the reduced speed since the work has a higher priority than
> the powerd process. To that end, I think that at least part of powerd needs
> to be in the kernel, or at least that the kernel should be more proactive
> about bumping the speed up when it resumes from Cx due to an interrupt. A
> simple policy would be to bump up to full speed for any non-clock interrupt
> (possibly bumping up for a clock interrupt if we wake up softclock as well).
I have an issue that I believe is similar to what you described. In my case,
running X (with a bunch of xterm and fvwm2) and powerd causes immediate
hang when ath(4) interface is turned up and no AP is in air. When some AP
is present, it takes much more time, but eventually the system still hung.
Running powerd without X or X without powerd, or not running ath0 provides
rock-solid machine. The laptop has no built-in com-port, neither it has
I would be glad to test the change.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20071228/d845ef4b/attachment.pgp
More information about the freebsd-acpi