From: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
To: "riel@redhat.com" <riel@redhat.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Kristo Tero (Nokia-D/Tampere)" <Tero.Kristo@nokia.com>,
"venkatesh.pallipadi@intel.com" <venkatesh.pallipadi@intel.com>,
"tglx@linutronix.de" <tglx@linutronix.de>
Subject: Re: [tip:timers/urgent] NOHZ: Properly feed cpufreq ondemand governor
Date: Wed, 27 May 2009 15:18:32 +0300 [thread overview]
Message-ID: <1243426712.19944.165.camel@eenurkka-desktop> (raw)
In-Reply-To: <tip-4e67ac87c460a3c876019fa05149591122ec5287@git.kernel.org>
On Wed, 2009-05-27 at 13:57 +0200, Nurkkala Eero.An (EXT-Offcode/Oulu)
wrote:
> Commit-ID: 4e67ac87c460a3c876019fa05149591122ec5287
> Gitweb: http://git.kernel.org/tip/4e67ac87c460a3c876019fa05149591122ec5287
> Author: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
> AuthorDate: Mon, 25 May 2009 09:57:37 +0300
> Committer: Thomas Gleixner <tglx@linutronix.de>
> CommitDate: Wed, 27 May 2009 13:55:00 +0200
>
> NOHZ: Properly feed cpufreq ondemand governor
>
> A call from irq_exit() may occasionally pause the timing
> info for cpufreq ondemand governor. This results in the
> cpufreq ondemand governor to fail to calculate the
> system load properly. Thus, relocate the checks for this
> particular case to keep the governor always functional.
>
> [ tglx: moved the check to the top of the function ]
>
> Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
> Reported-by: Tero Kristo <tero.kristo@nokia.com>
> Acked-by: Rik van Riel <riel@redhat.com>
> Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
> LKML-Reference: <12432346571351-git-send-email-ext-eero.nurkkala@nokia.com>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
>
> ---
> kernel/time/tick-sched.c | 12 ++++++++----
> 1 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> index d3f1ef4..d3d6f3f 100644
> --- a/kernel/time/tick-sched.c
> +++ b/kernel/time/tick-sched.c
> @@ -218,8 +218,15 @@ void tick_nohz_stop_sched_tick(int inidle)
> struct clock_event_device *dev = __get_cpu_var(tick_cpu_device).evtdev;
> int cpu;
>
> - local_irq_save(flags);
> + /*
> + * Call to tick_nohz_start_idle stops the last_update_time from being
> + * updated. Thus, it must not be called in the event we are called from
> + * irq_exit() with the prior state different than idle.
> + */
> + if (!inidle && !ts->inidle)
> + return;
>
> + local_irq_save(flags);
> cpu = smp_processor_id();
> ts = &per_cpu(tick_cpu_sched, cpu);
> now = tick_nohz_start_idle(ts);
> @@ -239,9 +246,6 @@ void tick_nohz_stop_sched_tick(int inidle)
> if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE))
> goto end;
>
> - if (!inidle && !ts->inidle)
> - goto end;
> -
> ts->inidle = 1;
>
> if (need_resched())
A quick note:
Now ts is uninitialized? So ts->inidle could cause troubles, no?
next prev parent reply other threads:[~2009-05-27 12:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-25 6:57 [PATCH] " ext-eero.nurkkala
2009-05-26 15:17 ` Rik van Riel
2009-05-26 17:47 ` Pallipadi, Venkatesh
2009-05-27 11:57 ` [tip:timers/urgent] " tip-bot for Eero Nurkkala
2009-05-27 12:18 ` Eero Nurkkala [this message]
2009-05-27 12:49 ` Thomas Gleixner
2009-05-27 12:54 ` tip-bot for Eero Nurkkala
2009-05-27 13:23 ` Rik van Riel
2009-05-27 13:33 ` Thomas Gleixner
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=1243426712.19944.165.camel@eenurkka-desktop \
--to=ext-eero.nurkkala@nokia.com \
--cc=Tero.Kristo@nokia.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=riel@redhat.com \
--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®