linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH] null_blk: poll queue support
Date: Tue, 14 Sep 2021 22:38:25 +0100	[thread overview]
Message-ID: <1a63be84-3024-722b-232b-90f606a2addd@gmail.com> (raw)
In-Reply-To: <baca710d-0f2a-16e2-60bd-b105b854e0ae@kernel.dk>

On 4/17/21 4:29 PM, Jens Axboe wrote:
> There's currently no way to experiment with polled IO with null_blk,
> which seems like an oversight. This patch adds support for polled IO.
> We keep a list of issued IOs on submit, and then process that list
> when mq_ops->poll() is invoked.

That would be pretty useful to have.

to fold in:

diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index 5914fed8fa56..eb5cfe189e90 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -1508,7 +1508,7 @@ static int null_poll(struct blk_mq_hw_ctx *hctx)
 		cmd = blk_mq_rq_to_pdu(req);
 		cmd->error = null_process_cmd(cmd, req_op(req), blk_rq_pos(req),
 						blk_rq_sectors(req));
-		nullb_complete_cmd(cmd);
+		end_cmd(cmd);
 		nr++;
 	}
 
> 
> A new parameter is added, poll_queues. It defaults to 1 like the
> submit queues, meaning we'll have 1 poll queue available.
> 
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> 
> ---

-- 
Pavel Begunkov

  parent reply	other threads:[~2021-09-14 21:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-17 15:29 [PATCH] null_blk: poll queue support Jens Axboe
2021-04-18  4:48 ` Chaitanya Kulkarni
2021-04-18  4:49 ` Chaitanya Kulkarni
2021-04-19 19:48   ` Jens Axboe
2021-04-19 22:19     ` Chaitanya Kulkarni
2021-04-19 22:55       ` Jens Axboe
2021-05-03 15:47 ` Bart Van Assche
2021-05-03 17:42   ` Jens Axboe
2021-05-04  0:32     ` Bart Van Assche
2021-09-14 21:38 ` Pavel Begunkov [this message]
2021-09-16  1:57   ` Jens Axboe
2021-09-20 11:40     ` Pavel Begunkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a63be84-3024-722b-232b-90f606a2addd@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).