From: Johannes Berg <johannes@sipsolutions.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Olof Johansson <olof@lixom.net>,
linuxppc-dev list <linuxppc-dev@ozlabs.org>,
Olaf Hering <olh@suse.de>
Subject: load average ~1 on powermac
Date: Thu, 14 Dec 2006 15:27:58 +0100 [thread overview]
Message-ID: <1166106478.3161.8.camel@johannes.berg> (raw)
[-- 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 --]
reply other threads:[~2006-12-14 14:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1166106478.3161.8.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=olh@suse.de \
--cc=olof@lixom.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox