Re: hard lockup in wait_lapic_expire() - bug in TSC deadline timer?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 24/05/2016 16:20, Alan Jenkins wrote:
> On 24/05/16 13:51, Paolo Bonzini wrote:
>> On 23/05/2016 16:30, Alan Jenkins wrote:
>>> https://github.com/torvalds/linux/compare/master...sourcejedi:kvm_lockup_fix?expand=1
>>>
>> Here the comparison (and the expired_advance_ns field) is only used to
>> issue the warning.
> No, because expired_advance_ns is used as the limit for the busy-wait.

Right, but I expected the limit to go away together with the warning in
the final patch, if the root cause can be fixed.

>> Could you change the patch to use __delay instead of
>> ndelay and
>
> No, because the limit is in ns, not host TSC ticks.  Also, we were
> passing _guest_ TSC ticks to __delay(), which looks like a second
> potential cause of lockups because guest TSC ticks are scaled.

This is correct.  It's missing a call to kvm_scale_tsc if you keep the
__delay.

> The problem was I didn't want to make a user-triggerable WARN_ON. But if
> we don't want WARN_ON at all, then maybe it's ok to compare the module
> parameter racily, so we don't need the extra field. There's no existing
> documentation which I could update, to say that reducing
> lapic_timer_advance_ns is not supported, right?  (Because even with
> checks, it means the guest deadline timer can fire when the TSC is
> showing a time prior to the deadline, so it could break guest assumptions).

I'd just make lapic_timer_advance_ns read-only, I think.

Thanks,

Paolo
--
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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux