diff mbox series

[for-next,v3,3/3] io_uring/rw: enable bio caches for IRQ rw

Message ID aab3521d49fd6c1ff6ea194c9e63d05565efc103.1666347703.git.asml.silence@gmail.com (mailing list archive)
State New
Headers show
Series implement pcpu bio caching for IRQ I/O | expand

Commit Message

Pavel Begunkov Oct. 21, 2022, 10:34 a.m. UTC
Now we can use IOCB_ALLOC_CACHE not only for iopoll'ed reads/write but
also for normal IRQ driven I/O.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 io_uring/rw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/io_uring/rw.c b/io_uring/rw.c
index a25cd44cd415..009ed489cfa0 100644
--- a/io_uring/rw.c
+++ b/io_uring/rw.c
@@ -647,6 +647,7 @@  static int io_rw_init_file(struct io_kiocb *req, fmode_t mode)
 	ret = kiocb_set_rw_flags(kiocb, rw->flags);
 	if (unlikely(ret))
 		return ret;
+	kiocb->ki_flags |= IOCB_ALLOC_CACHE;
 
 	/*
 	 * If the file is marked O_NONBLOCK, still allow retry for it if it
@@ -662,7 +663,7 @@  static int io_rw_init_file(struct io_kiocb *req, fmode_t mode)
 			return -EOPNOTSUPP;
 
 		kiocb->private = NULL;
-		kiocb->ki_flags |= IOCB_HIPRI | IOCB_ALLOC_CACHE;
+		kiocb->ki_flags |= IOCB_HIPRI;
 		kiocb->ki_complete = io_complete_rw_iopoll;
 		req->iopoll_completed = 0;
 	} else {