public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: eventfd comment fixup
@ 2011-03-02 20:04 Michael S. Tsirkin
  0 siblings, 0 replies; only message in thread
From: Michael S. Tsirkin @ 2011-03-02 20:04 UTC (permalink / raw)
  Cc: Avi Kivity, Marcelo Tosatti, kvm, linux-kernel

Clarify a comment in kvm/eventfd.c: we do
rcu_assign_pointer without explicit synchronize_rcu
afterwards, and the reason this works is because we
use a spinlock to synch against another place
which does call synchronize_rcu.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

---

diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index 2ca4535..e347b53 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -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.
 			 */

-- 
MST

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-02 20:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-02 20:04 [PATCH] kvm: eventfd comment fixup Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox