[PATCH 2/2] 9p: Track 9P RPC waiting time as IO

Remi Pommarel posted 2 patches 2 weeks, 3 days ago
There is a newer version of this series
[PATCH 2/2] 9p: Track 9P RPC waiting time as IO
Posted by Remi Pommarel 2 weeks, 3 days ago
Use io_wait_event_killable() to ensure that time spent waiting for 9P
RPC transactions is accounted as IO wait time.

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
---
 net/9p/client.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/9p/client.c b/net/9p/client.c
index f60d1d041adb..1b475525ac5b 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -590,8 +590,8 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
 	}
 again:
 	/* Wait for the response */
-	err = wait_event_killable(req->wq,
-				  READ_ONCE(req->status) >= REQ_STATUS_RCVD);
+	err = io_wait_event_killable(req->wq,
+				     READ_ONCE(req->status) >= REQ_STATUS_RCVD);
 
 	/* Make sure our req is coherent with regard to updates in other
 	 * threads - echoes to wmb() in the callback
-- 
2.50.1
Re: [PATCH 2/2] 9p: Track 9P RPC waiting time as IO
Posted by Dominique Martinet 2 weeks, 3 days ago
Remi Pommarel wrote on Wed, Jan 21, 2026 at 08:21:59PM +0100:
> Use io_wait_event_killable() to ensure that time spent waiting for 9P
> RPC transactions is accounted as IO wait time.

Thanks for splitting this out of your other 9p improvements!

I was about to ask Peter/Ingo which tree this should go through, but
could you also convert the other few wait_event_killable() calls in
net/9p/trans_*.c ?
They're either waiting for other IO to complete (virtio x2) or for the
current IO to complete (virtio/xen), so I think they qualify just as
much.

(the virtio ones will likely conflict with some other rework that's been
dragging on last month, but given the patch is trivial it won't matter
much, you can send as of master)

Thanks,
-- 
Dominique Martinet | Asmadeus