Re: [PATCH v8 clocksource 3/5] clocksource: Check per-CPU clock synchronization when marked unstable

2021-04-18 Thread Paul E. McKenney
On Sat, Apr 17, 2021 at 04:51:36PM -0700, Paul E. McKenney wrote: > On Sat, Apr 17, 2021 at 02:47:18PM +0200, Thomas Gleixner wrote: [ . . . ] > > > + delta = (s64)((csnow_mid - csnow_begin) & cs->mask); > > > + if (delta < 0) > > > + cpumask_set_cpu(cpu,

Re: [PATCH v8 clocksource 3/5] clocksource: Check per-CPU clock synchronization when marked unstable

2021-04-17 Thread Paul E. McKenney
On Sat, Apr 17, 2021 at 02:47:18PM +0200, Thomas Gleixner wrote: > On Tue, Apr 13 2021 at 21:36, Paul E. McKenney wrote: > > Bah, hit send too quick. > > > + cpumask_clear(_ahead); > > + cpumask_clear(_behind); > > + preempt_disable(); > > Daft. Would migrate_disable() be better? Yes,

Re: [PATCH v8 clocksource 3/5] clocksource: Check per-CPU clock synchronization when marked unstable

2021-04-17 Thread Paul E. McKenney
On Sat, Apr 17, 2021 at 02:28:22PM +0200, Thomas Gleixner wrote: > On Tue, Apr 13 2021 at 21:36, Paul E. McKenney wrote: > > diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c > > index 1fc0962c89c0..97eeaf164296 100644 > > --- a/arch/x86/kernel/kvmclock.c > > +++

Re: [PATCH v8 clocksource 3/5] clocksource: Check per-CPU clock synchronization when marked unstable

2021-04-17 Thread Thomas Gleixner
On Tue, Apr 13 2021 at 21:36, Paul E. McKenney wrote: Bah, hit send too quick. > + cpumask_clear(_ahead); > + cpumask_clear(_behind); > + preempt_disable(); Daft. > + testcpu = smp_processor_id(); > + pr_warn("Checking clocksource %s synchronization from CPU %d.\n", >

Re: [PATCH v8 clocksource 3/5] clocksource: Check per-CPU clock synchronization when marked unstable

2021-04-17 Thread Thomas Gleixner
On Tue, Apr 13 2021 at 21:36, Paul E. McKenney wrote: > diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c > index 1fc0962c89c0..97eeaf164296 100644 > --- a/arch/x86/kernel/kvmclock.c > +++ b/arch/x86/kernel/kvmclock.c > @@ -169,7 +169,7 @@ struct clocksource kvm_clock = { >