[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <8e0186ed-04bb-7bb8-ff09-581a7b9fdf03@chinatelecom.cn>
Date: Tue, 8 Feb 2022 17:47:17 +0800
From: zhenggy <zhenggy@...natelecom.cn>
To: bcrl@...ck.org, viro@...iv.linux.org.uk, ebiggers@...nel.org,
axboe@...nel.dk
Cc: linux-aio@...ck.org, linux-fsdevel@...r.kernel.org,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH] aio: inform block layer of how many requests we are
submitting
After commit 47c122e35d7e ("block: pre-allocate requests if plug is
started and is a batch"), block layer can make smarter request allocation
if it know how many requests it need to submit, so switch to use
blk_start_plug_nr_ios here to pass the number of requests we will submit.
Signed-off-by: GuoYong Zheng <zhenggy@...natelecom.cn>
---
fs/aio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/aio.c b/fs/aio.c
index 4ceba13..7c4935e 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -2071,7 +2071,7 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
nr = ctx->nr_events;
if (nr > AIO_PLUG_THRESHOLD)
- blk_start_plug(&plug);
+ blk_start_plug_nr_ios(&plug, nr);
for (i = 0; i < nr; i++) {
struct iocb __user *user_iocb;
--
1.8.3.1
Powered by blists - more mailing lists