Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53bda3e5 authored by Venkateswararao Jujjuri (JV)'s avatar Venkateswararao Jujjuri (JV) Committed by Eric Van Hensbergen
Browse files

[net/9p] unconditional wake_up to proc waiting for space on VirtIO ring



Process may wait to get space on VirtIO ring to send a transaction to
VirtFS server. Current code just does a conditional wake_up() which
means only one process will be woken up even if multiple processes
are waiting.

This fix makes the wake_up unconditional. Hence we won't have any
processes waiting for-ever.

Signed-off-by: default avatarVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
parent 42869c8a
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -146,11 +146,10 @@ static void req_done(struct virtqueue *vq)
		rc = virtqueue_get_buf(chan->vq, &len);
		rc = virtqueue_get_buf(chan->vq, &len);


		if (rc != NULL) {
		if (rc != NULL) {
			if (!chan->ring_bufs_avail) {
			chan->ring_bufs_avail = 1;
			chan->ring_bufs_avail = 1;
				wake_up(chan->vc_wq);
			}
			spin_unlock_irqrestore(&chan->lock, flags);
			spin_unlock_irqrestore(&chan->lock, flags);
			/* Wakeup if anyone waiting for VirtIO ring space. */
			wake_up(chan->vc_wq);
			P9_DPRINTK(P9_DEBUG_TRANS, ": rc %p\n", rc);
			P9_DPRINTK(P9_DEBUG_TRANS, ": rc %p\n", rc);
			P9_DPRINTK(P9_DEBUG_TRANS, ": lookup tag %d\n",
			P9_DPRINTK(P9_DEBUG_TRANS, ": lookup tag %d\n",
					rc->tag);
					rc->tag);