* [PATCH] aio: inform block layer of how many requests we are submitting
@ 2022-02-08 9:47 zhenggy
2022-02-09 6:49 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: zhenggy @ 2022-02-08 9:47 UTC (permalink / raw)
To: bcrl, viro, ebiggers, axboe; +Cc: linux-aio, linux-fsdevel, linux-kernel
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@chinatelecom.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] aio: inform block layer of how many requests we are submitting
2022-02-08 9:47 [PATCH] aio: inform block layer of how many requests we are submitting zhenggy
@ 2022-02-09 6:49 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2022-02-09 6:49 UTC (permalink / raw)
To: zhenggy
Cc: bcrl, viro, ebiggers, axboe, linux-aio, linux-fsdevel, linux-kernel
On Tue, Feb 08, 2022 at 05:47:17PM +0800, zhenggy wrote:
> 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@chinatelecom.cn>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] aio: inform block layer of how many requests we are submitting
2022-01-18 9:17 GuoYong Zheng
@ 2022-01-20 9:03 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2022-01-20 9:03 UTC (permalink / raw)
To: GuoYong Zheng; +Cc: bcrl, viro, linux-aio, linux-fsdevel, linux-kernel
On Tue, Jan 18, 2022 at 05:17:44PM +0800, GuoYong Zheng wrote:
> 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.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] aio: inform block layer of how many requests we are submitting
@ 2022-01-18 9:17 GuoYong Zheng
2022-01-20 9:03 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: GuoYong Zheng @ 2022-01-18 9:17 UTC (permalink / raw)
To: bcrl, viro; +Cc: linux-aio, linux-fsdevel, linux-kernel, GuoYong Zheng
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@chinatelecom.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-09 6:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 9:47 [PATCH] aio: inform block layer of how many requests we are submitting zhenggy
2022-02-09 6:49 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2022-01-18 9:17 GuoYong Zheng
2022-01-20 9:03 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).