summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-03-08 11:40:23 -0700
committerJens Axboe <axboe@kernel.dk>2021-08-12 11:27:02 -0600
commitb5256809c70c6db3ac514706de979248186147cd (patch)
treef9c0096748ac1cd4f3a0d00a878dd3c005ff3e4c
parentcd36a5ff3ca84616f91bfc2eb1095b995529b72b (diff)
io_uring: enable use of bio alloc cache
Mark polled IO as being safe for dipping into the bio allocation cache, in case the targeted bio_set has it enabled. This brings an IOPOLL gen2 Optane QD=128 workload from ~3.2M IOPS to ~3.5M IOPS. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--fs/io_uring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 84fb96afb222..a3628418bb84 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2735,7 +2735,7 @@ static int io_prep_rw(struct io_kiocb *req, const struct io_uring_sqe *sqe)
!kiocb->ki_filp->f_op->iopoll)
return -EOPNOTSUPP;
- kiocb->ki_flags |= IOCB_HIPRI;
+ kiocb->ki_flags |= IOCB_HIPRI | IOCB_ALLOC_CACHE;
kiocb->ki_complete = io_complete_rw_iopoll;
req->iopoll_completed = 0;
} else {