From: tip-bot for Gaurav Jindal <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
gaurav.jindal@spreadtrum.com, hpa@zytor.com,
Gaurav.Jindal@spreadtrum.com, sanjeev.yadav@spreadtrum.com,
tglx@linutronix.de
Subject: [tip:timers/core] tick/nohz: Optimize nohz idle enter
Date: Tue, 19 Jul 2016 04:51:53 -0700 [thread overview]
Message-ID: <tip-1f3b0f8243cb934307f59bd4d8e43b868e61d4d9@git.kernel.org> (raw)
In-Reply-To: <20160714120416.GB21099@gaurav.jindal@spreadtrum.com>
Commit-ID: 1f3b0f8243cb934307f59bd4d8e43b868e61d4d9
Gitweb: http://git.kernel.org/tip/1f3b0f8243cb934307f59bd4d8e43b868e61d4d9
Author: Gaurav Jindal <Gaurav.Jindal@spreadtrum.com>
AuthorDate: Thu, 14 Jul 2016 12:04:20 +0000
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 19 Jul 2016 13:48:24 +0200
tick/nohz: Optimize nohz idle enter
tick_nohz_start_idle is called before checking whether the idle tick can be
stopped. If the tick cannot be stopped, calling tick_nohz_start_idle() is
pointless and just wasting CPU cycles.
Only invoke tick_nohz_start_idle() when can_stop_idle_tick() returns true. A
short one minute observation of the effect on ARM64 shows a reduction of calls
by 1.5% thus optimizing the idle entry sequence.
[tglx: Massaged changelog ]
Co-developed-by: Sanjeev Yadav<sanjeev.yadav@spreadtrum.com>
Signed-off-by: Gaurav Jindal<gaurav.jindal@spreadtrum.com>
Link: http://lkml.kernel.org/r/20160714120416.GB21099@gaurav.jindal@spreadtrum.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/time/tick-sched.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 2ec7c00..204fdc8 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -908,11 +908,10 @@ static void __tick_nohz_idle_enter(struct tick_sched *ts)
ktime_t now, expires;
int cpu = smp_processor_id();
- now = tick_nohz_start_idle(ts);
-
if (can_stop_idle_tick(cpu, ts)) {
int was_stopped = ts->tick_stopped;
+ now = tick_nohz_start_idle(ts);
ts->idle_calls++;
expires = tick_nohz_stop_sched_tick(ts, now, cpu);
prev parent reply other threads:[~2016-07-19 11:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160714120416.GB21099@gaurav.jindal@spreadtrum.com>
2016-07-19 8:47 ` [PATCH]time: " Thomas Gleixner
2016-07-19 10:00 ` Gaurav Jindal (Gaurav Jindal)
2016-07-19 10:45 ` Thomas Gleixner
2016-07-19 11:51 ` tip-bot for Gaurav Jindal [this message]
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=tip-1f3b0f8243cb934307f59bd4d8e43b868e61d4d9@git.kernel.org \
--to=tipbot@zytor.com \
--cc=gaurav.jindal@spreadtrum.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=sanjeev.yadav@spreadtrum.com \
--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
Powered by JetHome