* load average ~1 on powermac
@ 2006-12-14 14:27 Johannes Berg
0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2006-12-14 14:27 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Olof Johansson, linuxppc-dev list, Olaf Hering
[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]
Hi,
After investigating a bit I finally found why the load average stays
around 1 on powermacs... Try this:
watch --interval 0.1 "ps xa|grep ' D'"
it'll show [kwindfarm] most of the time, with it going away for a while
sometimes.
Now, I thought windfarm wasn't actually doing anything wrong, it's doing
interruptible sleep. Not so!
@@ -115,11 +113,12 @@ static int wf_thread_func(void *data)
}
delay = next - jiffies;
+ printk(KERN_DEBUG "delay = %lu\n", delay);
if (delay <= HZ)
schedule_timeout_interruptible(delay);
reveals that in fact it's only sleeping for about 300 milliseconds most
of the time!
Now doing sysrq t a lot of time reveals that it's spending the rest in
wait_for_completion, called from two places.
* windfarm_smu_controls.c: smu_set_fan
* low_i2c.c: smu_i2c_xfer
the latter is called twice for every windfarm tick and takes about 170
milliseconds for each call, the first I haven't measured but it pretty
much has to account for the rest of the second...
I don't quite understand why the fan speed has to be set every tick but
even just reading the i2c stuff is probably bad enough.
I don't think we can solve this easily since all these things may be
called from userspace processes so being interruptible is not
appropriate unless we want to somehow handle that, but that probably
won't be easy.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-14 14:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-14 14:27 load average ~1 on powermac Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox