summaryrefslogtreecommitdiffstats
path: root/kernel/kcov.c
diff options
context:
space:
mode:
authorAnna-Maria Behnsen <anna-maria@linutronix.de>2020-07-17 16:05:42 +0200
committerThomas Gleixner <tglx@linutronix.de>2020-07-17 21:55:21 +0200
commit1f32cab0db4bdf6491eb4a60838f278e01c31698 (patch)
treeeac95e7bc21e442be85172703a11b073a8b8ee11 /kernel/kcov.c
parenttimers: Preserve higher bits of expiration on index calculation (diff)
downloadlinux-1f32cab0db4bdf6491eb4a60838f278e01c31698.tar.xz
linux-1f32cab0db4bdf6491eb4a60838f278e01c31698.zip
timers: Use only bucket expiry for base->next_expiry value
The bucket expiry time is the effective expriy time of timers and is greater than or equal to the requested timer expiry time. This is due to the guarantee that timers never expire early and the reduced expiry granularity in the secondary wheel levels. When a timer is enqueued, trigger_dyntick_cpu() checks whether the timer is the new first timer. This check compares next_expiry with the requested timer expiry value and not with the effective expiry value of the bucket into which the timer was queued. Storing the requested timer expiry value in base->next_expiry can lead to base->clk going backwards if the requested timer expiry value is smaller than base->clk. Commit 30c66fc30ee7 ("timer: Prevent base->clk from moving backward") worked around this by preventing the store when timer->expiry is before base->clk, but did not fix the underlying problem. Use the expiry value of the bucket into which the timer is queued to do the new first timer check. This fixes the base->clk going backward problem. The workaround of commit 30c66fc30ee7 ("timer: Prevent base->clk from moving backward") in trigger_dyntick_cpu() is not longer necessary as the timers bucket expiry is guaranteed to be greater than or equal base->clk. Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200717140551.29076-4-frederic@kernel.org
Diffstat (limited to 'kernel/kcov.c')
0 files changed, 0 insertions, 0 deletions