mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
nohz: reduce jiffies polling overhead
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
916941b2bf
commit
7a14ce1d8c
1 changed files with 7 additions and 0 deletions
|
@ -48,6 +48,13 @@ static void tick_do_update_jiffies64(ktime_t now)
|
|||
unsigned long ticks = 0;
|
||||
ktime_t delta;
|
||||
|
||||
/*
|
||||
* Do a quick check without holding xtime_lock:
|
||||
*/
|
||||
delta = ktime_sub(now, last_jiffies_update);
|
||||
if (delta.tv64 < tick_period.tv64)
|
||||
return;
|
||||
|
||||
/* Reevalute with xtime_lock held */
|
||||
write_seqlock(&xtime_lock);
|
||||
|
||||
|
|
Loading…
Reference in a new issue