* Re: [PATCH]time: Optimize nohz idle enter [not found] <20160714120416.GB21099@gaurav.jindal@spreadtrum.com> @ 2016-07-19 8:47 ` Thomas Gleixner 2016-07-19 10:00 ` Gaurav Jindal (Gaurav Jindal) 2016-07-19 11:51 ` [tip:timers/core] tick/nohz: " tip-bot for Gaurav Jindal 1 sibling, 1 reply; 4+ messages in thread From: Thomas Gleixner @ 2016-07-19 8:47 UTC (permalink / raw) To: Gaurav Jindal (Gaurav Jindal) Cc: Sanjeev Yadav (Sanjeev Kumar Yadav), linux-kernel On Thu, 14 Jul 2016, Gaurav Jindal (Gaurav Jindal) wrote: > > tick_nohz_start_idle is called before checking the condition if the idle tick > can be stopped. In case when can_stop_idle_tick returns 0, the function called > is of no use thus a extra call doing nothing. > > Shifting calling of function tick_nohz_start_idle inside the if condition makes > sure that corresponding operations are done only if idle tick can be actually > stopped. Observance for 1 minute on arm64 architecture shows that shifting code > can prevent 1.5% of extra calls thus optimizing the idle call sequence. Nice. > Signed-off-by: gaurav jindal<gaurav.jindal@spreadtrum.com> > Signed-off-by: sanjeev yadav<sanjeev.yadav@spreadtrum.com> This SOB chain is wrong. Sanjeev did not send the patch and is not the author. Please clarify. Thanks, tglx ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]time: Optimize nohz idle enter 2016-07-19 8:47 ` [PATCH]time: Optimize nohz idle enter Thomas Gleixner @ 2016-07-19 10:00 ` Gaurav Jindal (Gaurav Jindal) 2016-07-19 10:45 ` Thomas Gleixner 0 siblings, 1 reply; 4+ messages in thread From: Gaurav Jindal (Gaurav Jindal) @ 2016-07-19 10:00 UTC (permalink / raw) To: Thomas Gleixner; +Cc: Sanjeev Yadav (Sanjeev Kumar Yadav), linux-kernel On Tue, Jul 19, 2016 at 10:47:37AM +0200, Thomas Gleixner wrote: > On Thu, 14 Jul 2016, Gaurav Jindal (Gaurav Jindal) wrote: > > > > tick_nohz_start_idle is called before checking the condition if the idle tick > > can be stopped. In case when can_stop_idle_tick returns 0, the function called > > is of no use thus a extra call doing nothing. > > > > Shifting calling of function tick_nohz_start_idle inside the if condition makes > > sure that corresponding operations are done only if idle tick can be actually > > stopped. Observance for 1 minute on arm64 architecture shows that shifting code > > can prevent 1.5% of extra calls thus optimizing the idle call sequence. > > Nice. > > > Signed-off-by: gaurav jindal<gaurav.jindal@spreadtrum.com> > > Signed-off-by: sanjeev yadav<sanjeev.yadav@spreadtrum.com> > > This SOB chain is wrong. Sanjeev did not send the patch and is not the > author. Please clarify. > Actually Sanjeev and me worked together, but since only one send the mail so I included his name as SOB. > Thanks, > > tglx -- Regards Gaurav Jindal +91-8800803297 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]time: Optimize nohz idle enter 2016-07-19 10:00 ` Gaurav Jindal (Gaurav Jindal) @ 2016-07-19 10:45 ` Thomas Gleixner 0 siblings, 0 replies; 4+ messages in thread From: Thomas Gleixner @ 2016-07-19 10:45 UTC (permalink / raw) To: Gaurav Jindal (Gaurav Jindal) Cc: Sanjeev Yadav (Sanjeev Kumar Yadav), linux-kernel On Tue, 19 Jul 2016, Gaurav Jindal (Gaurav Jindal) wrote: > On Tue, Jul 19, 2016 at 10:47:37AM +0200, Thomas Gleixner wrote: > > On Thu, 14 Jul 2016, Gaurav Jindal (Gaurav Jindal) wrote: > > > > > > tick_nohz_start_idle is called before checking the condition if the idle tick > > > can be stopped. In case when can_stop_idle_tick returns 0, the function called > > > is of no use thus a extra call doing nothing. > > > > > > Shifting calling of function tick_nohz_start_idle inside the if condition makes > > > sure that corresponding operations are done only if idle tick can be actually > > > stopped. Observance for 1 minute on arm64 architecture shows that shifting code > > > can prevent 1.5% of extra calls thus optimizing the idle call sequence. > > > > Nice. > > > > > Signed-off-by: gaurav jindal<gaurav.jindal@spreadtrum.com> > > > Signed-off-by: sanjeev yadav<sanjeev.yadav@spreadtrum.com> > > > > This SOB chain is wrong. Sanjeev did not send the patch and is not the > > author. Please clarify. > > > Actually Sanjeev and me worked together, but since only one send the mail so I > included his name as SOB. That does not make it more correct. See Documentation/SubmittingPatches. I fixed it up. Thanks, tglx ^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:timers/core] tick/nohz: Optimize nohz idle enter [not found] <20160714120416.GB21099@gaurav.jindal@spreadtrum.com> 2016-07-19 8:47 ` [PATCH]time: Optimize nohz idle enter Thomas Gleixner @ 2016-07-19 11:51 ` tip-bot for Gaurav Jindal 1 sibling, 0 replies; 4+ messages in thread From: tip-bot for Gaurav Jindal @ 2016-07-19 11:51 UTC (permalink / raw) To: linux-tip-commits Cc: linux-kernel, mingo, gaurav.jindal, hpa, Gaurav.Jindal, sanjeev.yadav, tglx 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); ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-19 11:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20160714120416.GB21099@gaurav.jindal@spreadtrum.com>
2016-07-19 8:47 ` [PATCH]time: Optimize nohz idle enter Thomas Gleixner
2016-07-19 10:00 ` Gaurav Jindal (Gaurav Jindal)
2016-07-19 10:45 ` Thomas Gleixner
2016-07-19 11:51 ` [tip:timers/core] tick/nohz: " tip-bot for Gaurav Jindal
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®