Re: 5.13-rt1 + KVM = WARNING: at fs/eventfd.c:74 eventfd_signal()

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

 



On Fri, 16 Jul 2021 13:55:27 +0200 Paolo Bonzini wrote:
>On 16/07/21 11:37, Hillf Danton wrote:
>> On Fri, 16 Jul 2021 09:59:15 +0200 Paolo Bonzini wrote:
>>> * the warning only occurs if preemption occurs during the
>>> spin_lock_irqsave critical section (and therefore it can only occur in
>>> PREEMPT_RT kernels)
>> 
>> With that lock held, no waitqueue entry can be added on to the WQ - IOW no
>> wakeup will go stray.
>> 
>>> * the warning causes an early return 0 that messes up the VM's networking
>> 
>> Is the messup due to the zero or wakeup?
>
>It's caused by the missing wakeup, i.e. eventfd_signal not really 
>signaling anything.

There are two cases of write_seqcount_begin in x/virt/kvm/eventfd.c, and
in kvm_irqfd_deassign() it is surrounded by spin_lock_irq(&kvm->irqfds.lock)
that also protects irqfd_update().

What isnt clear is if the risk is zero that either case can be preempted by
seqcount reader. That risk may end up with the livelock described in
x/Documentation/locking/seqlock.rst.

+A sequence counter write side critical section must never be preempted
+or interrupted by read side sections. Otherwise the reader will spin for
+the entire scheduler tick due to the odd sequence count value and the
+interrupted writer. If that reader belongs to a real-time scheduling
+class, it can spin forever and the kernel will livelock.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux