Skip to contentSkip to conversation

Change wake_up to wake_up_all() in the virtio transport.

PATCH In review Venkateswararao Jujjuri (JV) 2 participants 2 messages Mar 8, 2011 – Mar 9, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Change wake_up to wake_up_all() in the virtio transport.

This fix wakes up all the threads waiting for the space on VirtIO ring.

---
 net/9p/trans_virtio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/9p/trans_virtio.c +1 -1
index 9b550ed..e90e954 100644
@@ -148,7 +148,7 @@ static void req_done(struct virtqueue *vq)
 		if (rc != NULL) {
 			if (!chan->ring_bufs_avail) {
 				chan->ring_bufs_avail = 1;
-				wake_up(chan->vc_wq);
+				wake_up_all(chan->vc_wq);
 			}
 			spin_unlock_irqrestore(&chan->lock, flags);
 			P9_DPRINTK(P9_DEBUG_TRANS, ": rc %p\n", rc);
Signature · 1 line
1.6.5.2
#1 lore raw
Quoted 2 lines · Venkateswararao Jujjuri (JV)

This fix wakes up all the threads waiting for the space on VirtIO ring.

It would be nice to document in commit message what error you saw without the change. Is it that the tasks were waiting even though there was space in the virtio ring because they didn't get woken up ?

Quoted 12 lines
---
 net/9p/trans_virtio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/9p/trans_virtio.c +0 -0
index 9b550ed..e90e954 100644

net/9p/trans_virtio.c static void req_done(struct virtqueue *vq) · line 154

Quoted 8 lines
net/9p/trans_virtio.c +1 -1
@@ -148,7 +148,7 @@ static void req_done(struct virtqueue *vq)
 		if (rc != NULL) {
 			if (!chan->ring_bufs_avail) {
 				chan->ring_bufs_avail = 1;
-				wake_up(chan->vc_wq);
+				wake_up_all(chan->vc_wq);
 			}
 			spin_unlock_irqrestore(&chan->lock, flags);
 			P9_DPRINTK(P9_DEBUG_TRANS, ": rc %p\n", rc);

-aneesh