linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] reorder slow clock source read for clock source watchdog
@ 2018-11-27 11:15 Luming Yu
  0 siblings, 0 replies; only message in thread
From: Luming Yu @ 2018-11-27 11:15 UTC (permalink / raw)
  To: linux-kernel

the clock source watchdog (HPET) in skx is much slower
than the clock source TSC. The long latency in the first
call may trigger a false postive TSC unstable noise.
Let the fast one follows the slow one should fix it.

Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Yongkai Wu <yongkaiwu@tencent.com>
---
 kernel/time/clocksource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index ffe081623aec..8ea929e50ca6 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -225,8 +225,8 @@ static void clocksource_watchdog(struct timer_list *unused)
 		}
 
 		local_irq_disable();
-		csnow = cs->read(cs);
 		wdnow = watchdog->read(watchdog);
+		csnow = cs->read(cs);
 		local_irq_enable();
 
 		/* Clocksource initialized ? */
-- 
2.14.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-27 11:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27 11:15 [PATCH] reorder slow clock source read for clock source watchdog Luming Yu

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).