linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] validate the delta of cycle_now and cycle_last on arm64
@ 2015-10-27 13:21 Yang Yingliang
  2015-10-27 13:21 ` [PATCH 1/2] clocksource: replace cycle_last validation with an equal way Yang Yingliang
  2015-10-27 13:21 ` [PATCH 2/2] arm64: validate the delta of cycle_now and cycle_last Yang Yingliang
  0 siblings, 2 replies; 12+ messages in thread
From: Yang Yingliang @ 2015-10-27 13:21 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel; +Cc: Yang Yingliang, Thomas Gleixner

In multi-core system, if the clock is not sync perfectly, it
will make cycle_last that recorded by CPU-A is a little more
than cycle_now that read by CPU-B. With the negative result,
hrtimer_update_base() return a huge and wrong time. It leads
to the cpu can not finish the while loop in hrtimer_interrupt()
until the real nowtime which is returned from ktime_get() catch
up with the wrong time on clock monotonic base.

Fix it by select config CLOCKSOURCE_VALIDATE_LAST_CYCLE.

Cc: Thomas Gleixner <tglx@linutronix.de>

Yang Yingliang (2):
  clocksource: replace cycle_last validation with an equal way
  arm64: validate the cycle_last to prevent time going backwards

 arch/arm64/Kconfig                 | 1 +
 kernel/time/timekeeping_internal.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

-- 
2.5.0



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-01-04 17:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-27 13:21 [PATCH 0/2] validate the delta of cycle_now and cycle_last on arm64 Yang Yingliang
2015-10-27 13:21 ` [PATCH 1/2] clocksource: replace cycle_last validation with an equal way Yang Yingliang
2015-10-30 14:56   ` Thomas Gleixner
2015-10-31 10:07     ` Yang Yingliang
2015-10-31 10:20     ` [PATCH resend] clocksource: modify the cycle_last validation to fit for non-64bit clocksourece mask Yang Yingliang
2015-12-19 15:03       ` [tip:timers/core] clocksource: Make clocksource validation work for all clocksources tip-bot for Yang Yingliang
2016-01-04 17:13         ` John Stultz
2015-10-27 13:21 ` [PATCH 2/2] arm64: validate the delta of cycle_now and cycle_last Yang Yingliang
2015-10-27 14:03   ` Mark Rutland
2015-10-28  1:33     ` Ding Tianhong
2015-10-29  7:36     ` Yang Yingliang
2015-10-29  8:31       ` Yang Yingliang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).