public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Suwan Kim <suwan.kim027@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	mst@redhat.com, jasowang@redhat.com, pbonzini@redhat.com,
	virtualization@lists.linux-foundation.org,
	linux-block@vger.kernel.org
Subject: Re: [PATCH 1/2] virtio-blk: set req->state to MQ_RQ_COMPLETE after polling I/O is finished
Date: Mon, 12 Dec 2022 23:21:32 +0900	[thread overview]
Message-ID: <Y5c47EqWknNKefRl@localhost.localdomain> (raw)
In-Reply-To: <Y5bPG9QGMd/cDTQG@infradead.org>

On Sun, Dec 11, 2022 at 10:50:03PM -0800, Christoph Hellwig wrote:
> On Thu, Dec 08, 2022 at 09:48:23AM -0700, Jens Axboe wrote:
> > > The doc comment for blk_mq_set_request_complete() mentions this being
> > > used in ->queue_rq(), but that's not the case here. Does the doc comment
> > > need to be updated if we're using the function in a different way?
> > 
> > Looks like it's a bit outdated...
> 
> I think the comment is still entirely correct.
> 
> > 
> > > I'm not familiar enough with the Linux block APIs, but this feels weird
> > > to me. Shouldn't blk_mq_end_request_batch(iob) take care of this for us?
> > > Why does it set the state to IDLE instead of COMPLETE?
> > > 
> > > I think Jens can confirm whether we really want all drivers that use
> > > polling and io_comp_batch to manually call
> > > blk_mq_set_request_complete().
> > 
> > Should not be a need to call blk_mq_set_request_complete() directly in
> > the driver for this.
> 
> Exactly.  Polling or not, drivers should go through the normal completion
> interface, that is blk_mq_complete_request or the lower-level options
> blk_mq_complete_request_remote and blk_mq_complete_request_direct.

Hi all,

Thanks for the comment. It was the wrong use of the function...
I will use blk_mq_complete_request_remote() instead of
blk_mq_set_request_complete() and send next version soon.

Regards,
Suwan Kim

      reply	other threads:[~2022-12-12 14:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 14:11 [PATCH 1/2] virtio-blk: set req->state to MQ_RQ_COMPLETE after polling I/O is finished Suwan Kim
2022-12-06 14:11 ` [PATCH 2/2] virtio-blk: support completion batching for the IRQ path Suwan Kim
2022-12-07 22:05   ` Stefan Hajnoczi
2022-12-12 14:43     ` Suwan Kim
2022-12-07 21:47 ` [PATCH 1/2] virtio-blk: set req->state to MQ_RQ_COMPLETE after polling I/O is finished Stefan Hajnoczi
2022-12-08 16:48   ` Jens Axboe
2022-12-12  6:50     ` Christoph Hellwig
2022-12-12 14:21       ` Suwan Kim [this message]

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=Y5c47EqWknNKefRl@localhost.localdomain \
    --to=suwan.kim027@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=jasowang@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.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