On 08/30/2010 09:06 AM, Glauber Costa wrote: > With a reliable steal time mechanism, we can tell if we're > out of the cpu for very long, differentiating from the case > that we simply got a real softlockup. > > In the case we were out of cpu, the watchdog is fed, making > bogus softlockups disappear. Why not change the softlockup to measure unstolen time rather than explicitly poking it from a hypervisor-specific function? How is touching it in kvm_get_steal_time() correct anyway? J > Signed-off-by: Glauber Costa <glommer@xxxxxxxxxx> > --- > arch/x86/kernel/kvmclock.c | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c > index a1f4852..d217475 100644 > --- a/arch/x86/kernel/kvmclock.c > +++ b/arch/x86/kernel/kvmclock.c > @@ -91,6 +91,7 @@ cputime_t kvm_get_steal_time(void) > { > u64 delta = 0; > u64 *last_steal_info, this_steal_info; > + int touch_wd; > struct pvclock_vcpu_time_info *src; > > src = &get_cpu_var(hv_clock); > @@ -104,6 +105,10 @@ cputime_t kvm_get_steal_time(void) > > delta = this_steal_info - *last_steal_info; > > + touch_wd = softlockup_thresh * 1000UL; > + if ((touch_wd > 0) && (delta > touch_wd)) > + touch_softlockup_watchdog(); > + > *last_steal_info = this_steal_info; > put_cpu_var(steal_info); > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html