From: Viresh Kumar <viresh.kumar@linaro.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Lists linaro-kernel <linaro-kernel@lists.linaro.org>
Subject: Re: [Query]: tick-sched: why don't we stop tick when we are running idle task?
Date: Fri, 11 Apr 2014 15:34:23 +0530 [thread overview]
Message-ID: <CAKohpomMhpGsYGafr5uZ0QgO0MEndqDA4G=4syhus4sZW3d8cg@mail.gmail.com> (raw)
In-Reply-To: <20140410143857.GA27654@localhost.localdomain>
On 10 April 2014 20:09, Frederic Weisbecker <fweisbec@gmail.com> wrote:
> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> index 9f8af69..1e2d6b7 100644
> --- a/kernel/time/tick-sched.c
> +++ b/kernel/time/tick-sched.c
> @@ -202,13 +202,16 @@ static void tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now);
> void __tick_nohz_full_check(void)
> {
> struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);
> + unsigned long flags;
>
> + local_irq_save(flags);
As we need to disable interrupts to read this variable, would it be
better to just remove this completely and use is_idle_task(current)
instead?
> if (tick_nohz_full_cpu(smp_processor_id())) {
> - if (ts->tick_stopped && !is_idle_task(current)) {
> + if (ts->tick_stopped && !ts->inidle)) {
> if (!can_stop_full_tick())
> tick_nohz_restart_sched_tick(ts, ktime_get());
> }
> }
> + local_irq_restore(flags);
> }
> If you like it I'll push it to Ingo.
Yes please. And thanks for the explanations. It was pretty useful.
I am looking to offload 1 second tick to timekeeping CPUs and so
going through these frameworks. I don't have a working solution yet
(even partially :)). Would send a RFC to you as soon as I get anything
working.
--
viresh
next prev parent reply other threads:[~2014-04-11 10:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-09 10:33 [Query]: tick-sched: why don't we stop tick when we are running idle task? Viresh Kumar
2014-04-09 10:49 ` Viresh Kumar
2014-04-10 14:39 ` Frederic Weisbecker
2014-04-11 10:04 ` Viresh Kumar [this message]
2014-04-11 14:53 ` Frederic Weisbecker
2014-04-11 15:18 ` Peter Zijlstra
2014-04-11 16:38 ` Viresh Kumar
2014-04-14 9:48 ` Preeti Murthy
2014-04-14 9:51 ` Viresh Kumar
2014-04-14 11:02 ` Peter Zijlstra
2014-04-14 11:42 ` Viresh Kumar
2014-04-14 11:47 ` Peter Zijlstra
2014-04-14 11:52 ` Viresh Kumar
2014-04-14 12:06 ` Peter Zijlstra
2014-04-15 6:04 ` Viresh Kumar
2014-04-15 9:30 ` Frederic Weisbecker
2014-04-15 10:52 ` Peter Zijlstra
2014-04-15 10:53 ` Peter Zijlstra
2014-04-23 11:12 ` Viresh Kumar
2014-05-09 8:44 ` Viresh Kumar
2014-05-13 23:30 ` Frederic Weisbecker
2014-05-22 8:44 ` Peter Zijlstra
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='CAKohpomMhpGsYGafr5uZ0QgO0MEndqDA4G=4syhus4sZW3d8cg@mail.gmail.com' \
--to=viresh.kumar@linaro.org \
--cc=fweisbec@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).