Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "tick/common: Make tick_periodic() check for missing ticks"

This reverts commit d441dceb5dce71150f28add80d36d91bbfccba99 due to
boot failures.

Reported-by: Qian Cai <cai@lca.pw>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <longman@redhat.com>

+3 -33
+3 -33
kernel/time/tick-common.c
··· 16 16 #include <linux/profile.h> 17 17 #include <linux/sched.h> 18 18 #include <linux/module.h> 19 - #include <linux/sched/clock.h> 20 19 #include <trace/events/power.h> 21 20 22 21 #include <asm/irq_regs.h> ··· 84 85 static void tick_periodic(int cpu) 85 86 { 86 87 if (tick_do_timer_cpu == cpu) { 87 - /* 88 - * Use running_clock() as reference to check for missing ticks. 89 - */ 90 - static ktime_t last_update; 91 - ktime_t now; 92 - int ticks = 1; 93 - 94 - now = ns_to_ktime(running_clock()); 95 88 write_seqlock(&jiffies_lock); 96 89 97 - if (last_update) { 98 - u64 delta = ktime_sub(now, last_update); 99 - 100 - /* 101 - * Check for eventually missed ticks 102 - * 103 - * There is likely a persistent delta between 104 - * last_update and tick_next_period. So they are 105 - * updated separately. 106 - */ 107 - if (delta >= 2 * tick_period) { 108 - s64 period = ktime_to_ns(tick_period); 109 - 110 - ticks = ktime_divns(delta, period); 111 - } 112 - last_update = ktime_add(last_update, 113 - ticks * tick_period); 114 - } else { 115 - last_update = now; 116 - } 117 - 118 90 /* Keep track of the next tick event */ 119 - tick_next_period = ktime_add(tick_next_period, 120 - ticks * tick_period); 121 - do_timer(ticks); 91 + tick_next_period = ktime_add(tick_next_period, tick_period); 92 + 93 + do_timer(1); 122 94 write_sequnlock(&jiffies_lock); 123 95 update_wall_time(); 124 96 }