From: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
To: ext Steven Noonan <steven@uplinklabs.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Rik van Riel <riel@redhat.com>,
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Subject: Re: [BISECTED] "conservative" cpufreq governor broken
Date: Wed, 07 Oct 2009 08:27:10 +0300 [thread overview]
Message-ID: <1254893230.30157.28.camel@eenurkka-desktop> (raw)
In-Reply-To: <f488382f0910061822wf8da0c1m7f118f04fe793abe@mail.gmail.com>
On Wed, 2009-10-07 at 03:22 +0200, ext Steven Noonan wrote:
> >>
> >> Tracers may by themselves add some load into the system.
> >>
> >> If I were you, I'd add something like: (I have only one CPU BTW)
> >>
> >> static ktime_t time_prior_idle;
> >> static int64_t idle_total;
> >>
> >> time_prior_idle = ktime_get();
> >> <idle stuff>
> >> idle_total += ktime_to_ns(ktime_sub(ktime_get(), time_prior_idle));
> >>
> >> and have a sysfs hook (something already present, so you can just cat
> >> it) with a trace:
> >>
> >> printk("Times: %lld, %lld \n", idle_total, ktime_to_ns(ktime_get()));
> >>
> >> Sample output:
> >> 374758812519, 386768249832
> >>
> >> So I have 386768249832 / 386768249832 = 96.9 % time spent in idle in
> >> this case.
> >>
> >> (Right, this should provide somewhat descent info, hopefully ;) )
> >>
> >
> > Well, I tried adding the code to cpu_idle() as suggested, but it never
> > printed anything. Apparently cpu_idle() isn't ever being called here.
> > Even added a 'BUG();' at the beginning of the function and it never
> > hit it. Of course, I'm probably missing something obvious. Is there a
> > separate cpu_idle()-esque function for SMP?
> >
>
> Oh crap. Perhaps it's more insidious. I reverted the bisected commit
> and it _DID_ hit the line I added. So cpu_idle is never entered with
> the bisected commit. Bizarre.
>
> - Steven
So you're saying that cpu_idle() is not ever called.. The commit in
question - whether you got it or had it reverted - should, and must not
be a trigger for your system to hit cpu_idle(). What if you took a look
at init/main.c, and added traces before the first call to cpu_idle():
start_kernel() ->
rest_init() ->
cpu_idle()
With the patch not reverted?
So I guess, that an irq may actually start your "system up" (patch
reverted) somehow:
irq_exit() ->
tick_nohz_stop_sched_tick() ->
tick_nohz_start_idle() ->
sched_clock_idle_sleep_event() ?
So it looks that maybe the conservative governor isn't broken after
all ;)
(BTW I guess, with SMP, you may wish to have fix things to work in your
setup
static ktime_t time_prior_idle[2];
static int64_t idle_total[2];
and
time_prior_idle[smp_processor_id()] = ktime_get();
etc, and print out times separately).
- Eero
next prev parent reply other threads:[~2009-10-07 5:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-05 16:32 Steven Noonan
2009-10-06 7:31 ` Eero Nurkkala
2009-10-06 10:22 ` Steven Noonan
2009-10-06 10:43 ` Eero Nurkkala
2009-10-06 11:22 ` Steven Noonan
2009-10-06 12:36 ` Eero Nurkkala
2009-10-07 0:54 ` Steven Noonan
2009-10-07 1:22 ` Steven Noonan
2009-10-07 5:27 ` Eero Nurkkala [this message]
2009-10-07 7:30 ` Steven Noonan
2009-10-07 7:49 ` Eero Nurkkala
2009-10-07 8:05 ` Steven Noonan
2009-10-07 8:11 ` Steven Noonan
2009-10-07 8:14 ` Eero Nurkkala
2009-10-07 8:24 ` Steven Noonan
2009-10-07 8:43 ` Eero Nurkkala
2009-10-07 8:52 ` Steven Noonan
2009-10-07 9:31 ` Eero Nurkkala
2009-10-07 10:42 ` Thomas Gleixner
2009-10-07 11:03 ` Steven Noonan
2009-10-07 11:15 ` Thomas Gleixner
2009-10-07 11:06 ` [tip:timers/urgent] NOHZ: update idle state also when NOHZ is inactive tip-bot for Eero Nurkkala
2009-10-07 13:35 ` Rik van Riel
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=1254893230.30157.28.camel@eenurkka-desktop \
--to=ext-eero.nurkkala@nokia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@redhat.com \
--cc=steven@uplinklabs.net \
--cc=tglx@linutronix.de \
--cc=venkatesh.pallipadi@intel.com \
/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
all inboxes | Powered by JetHome®