Skip to contentSkip to conversation

kvm: improve comment on rcu use in irqfd_deassign

PATCH Applied Michael S. Tsirkin 2 participants 2 messages Mar 6, 2011 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm: improve comment on rcu use in irqfd_deassign

The RCU use in kvm_irqfd_deassign is tricky: we have rcu_assign_pointer but no synchronize_rcu: synchronize_rcu is done by kvm_irq_routing_update which we share a spinlock with.

Fix up a comment in an attempt to make this clearer.

---
 virt/kvm/eventfd.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
virt/kvm/eventfd.c +3 -2
index 2ca4535..3656849 100644
@@ -313,8 +313,9 @@ kvm_irqfd_deassign(struct kvm *kvm, int fd, int gsi)
 		if (irqfd->eventfd == eventfd && irqfd->gsi == gsi) {
 			/*
 			 * This rcu_assign_pointer is needed for when
-			 * another thread calls kvm_irqfd_update before
-			 * we flush workqueue below.
+			 * another thread calls kvm_irq_routing_update before
+			 * we flush workqueue below (we synchronize with
+			 * kvm_irq_routing_update using irqfds.lock).
 			 * It is paired with synchronize_rcu done by caller
 			 * of that function.
 			 */
Signature · 1 line
1.7.3.2.91.g446ac
Applied
#1 lore raw
Quoted 5 lines · Michael S. Tsirkin

The RCU use in kvm_irqfd_deassign is tricky: we have rcu_assign_pointer but no synchronize_rcu: synchronize_rcu is done by kvm_irq_routing_update which we share a spinlock with.

Fix up a comment in an attempt to make this clearer.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function