time: Optimize nohz idle enter
A message that is not in the archive (sent off-list or not yet received): [email protected]@spreadtrum.com
Quoted 9 lines · Gaurav Jindal (Gaurav Jindal)
tick_nohz_start_idleis called before checking the condition if the idle tick can be stopped. In case whencan_stop_idle_tickreturns 0, the function called is of no use thus a extra call doing nothing.Shifting calling of function
tick_nohz_start_idleinside 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.
Quoted 2 lines
Signed-off-by gaurav jindal<[email protected]>Signed-off-by sanjeev yadav<[email protected]>
This SOB chain is wrong. Sanjeev did not send the patch and is not the author. Please clarify.
Thanks,
tglx
Quoted 11 lines · Thomas Gleixner
Quoted 9 lines · Gaurav Jindal (Gaurav Jindal)
tick_nohz_start_idleis called before checking the condition if the idle tick can be stopped. In case whencan_stop_idle_tickreturns 0, the function called is of no use thus a extra call doing nothing.Shifting calling of function
tick_nohz_start_idleinside 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.
Quoted 8 lines
Nice.
Quoted 2 lines
Signed-off-by gaurav jindal<[email protected]>Signed-off-by sanjeev yadav<[email protected]>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.
Quoted 3 lines
Thanks,
tglx
Signature · 3 lines
Regards Gaurav Jindal +91-8800803297
Quoted 14 lines · Gaurav Jindal (Gaurav Jindal)
Quoted 13 lines · Thomas Gleixner
Quoted 9 lines · Gaurav Jindal (Gaurav Jindal)
tick_nohz_start_idleis called before checking the condition if the idle tick can be stopped. In case whencan_stop_idle_tickreturns 0, the function called is of no use thus a extra call doing nothing.Shifting calling of function
tick_nohz_start_idleinside 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.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Signed-off-by gaurav jindal<[email protected]>Signed-off-by sanjeev yadav<[email protected]>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
tip-bot for Gaurav Jindal
merge bot[tip:timers/core] tick/nohz: Optimize nohz idle enter
In reply to a message not in the archivetick/nohz: Optimize nohz idle enter
Commit-ID: 1f3b0f8243cb934307f59bd4d8e43b868e61d4d9 Gitweb: http://git.kernel.org/tip/1f3b0f8243cb934307f59bd4d8e43b868e61d4d9 Author: Gaurav Jindal <[email protected]> AuthorDate: Thu, 14 Jul 2016 12:04:20 +0000 Committer: Thomas Gleixner <[email protected]> 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 ]
--- kernel/time/tick-sched.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/time/tick-sched.c +1 -2
@@ -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);