Re: suspicious RCU usage

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

 




On 25/02/2017 04:44, Ross Zwisler wrote:
> During Crystal Ridge testing in KVM virtual machines we have occasionally seen
> "suspicious RCU usage" messages.  They don't seem to be tied to any one
> specific test, and my guess is that we are occasionally just losing a race.

I think it's just a trivial ordering bug:

diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 14f65a5f938e..5215629ad692 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -161,8 +161,8 @@ void kvm_async_pf_task_wait(u32 token)
 			 */
 			rcu_irq_exit();
 			native_safe_halt();
-			rcu_irq_enter();
 			local_irq_disable();
+			rcu_irq_enter();
 		}
 	}
 	if (!n.halted)


because the async page fault code checks for preempt_disable() already,
and kmap_atomic already does preempt_disable outside pagefault_disable.

Let me know if the above is enough to fix it for you.

Paolo



[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