linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org,
	Max Gurtovoy <maxg@mellanox.com>,
	Sagi Grimberg <sagi@grimberg.me>,
	Keith Busch <keith.busch@intel.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH V2 0/5] blk-mq: wait until completed req's complete fn is run
Date: Tue, 30 Jul 2019 08:45:26 +0800	[thread overview]
Message-ID: <20190730004525.GB28708@ming.t460p> (raw)
In-Reply-To: <20190724034843.10879-1-ming.lei@redhat.com>

On Wed, Jul 24, 2019 at 11:48:38AM +0800, Ming Lei wrote:
> Hi,
> 
> blk-mq may schedule to call queue's complete function on remote CPU via
> IPI, but never provide any way to synchronize the request's complete
> fn.
> 
> In some driver's EH(such as NVMe), hardware queue's resource may be freed &
> re-allocated. If the completed request's complete fn is run finally after the
> hardware queue's resource is released, kernel crash will be triggered.
> 
> Fixes this issue by waitting until completed req's complete fn is run.
> 
> V2:
> 	- fix one build warning
> 	- fix commit log
> 	- apply the wait on nvme-fc code too
> 
> Thanks,
> Ming
> 
> Ming Lei (5):
>   blk-mq: introduce blk_mq_request_completed()
>   blk-mq: introduce blk_mq_tagset_wait_completed_request()
>   nvme: don't abort completed request in nvme_cancel_request
>   nvme: wait until all completed request's complete fn is called
>   blk-mq: remove blk_mq_complete_request_sync
> 
>  block/blk-mq-tag.c         | 32 ++++++++++++++++++++++++++++++++
>  block/blk-mq.c             | 13 ++++++-------
>  drivers/nvme/host/core.c   |  6 +++++-
>  drivers/nvme/host/fc.c     |  2 ++
>  drivers/nvme/host/pci.c    |  2 ++
>  drivers/nvme/host/rdma.c   |  8 ++++++--
>  drivers/nvme/host/tcp.c    |  8 ++++++--
>  drivers/nvme/target/loop.c |  2 ++
>  include/linux/blk-mq.h     |  3 ++-
>  9 files changed, 63 insertions(+), 13 deletions(-)
> 
> Cc: Max Gurtovoy <maxg@mellanox.com>
> Cc: Sagi Grimberg <sagi@grimberg.me>
> Cc: Keith Busch <keith.busch@intel.com>
> Cc: Christoph Hellwig <hch@lst.de>

Hello Jens, Chritoph and Guys,

Ping on this fix.

Thanks,
Ming

  parent reply	other threads:[~2019-07-30  0:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24  3:48 [PATCH V2 0/5] blk-mq: wait until completed req's complete fn is run Ming Lei
2019-07-24  3:48 ` [PATCH V2 1/5] blk-mq: introduce blk_mq_request_completed() Ming Lei
2019-07-24  3:48 ` [PATCH V2 2/5] blk-mq: introduce blk_mq_tagset_wait_completed_request() Ming Lei
2019-07-24  3:48 ` [PATCH V2 3/5] nvme: don't abort completed request in nvme_cancel_request Ming Lei
2019-07-24  3:48 ` [PATCH V2 4/5] nvme: wait until all completed request's complete fn is called Ming Lei
2019-07-24  3:48 ` [PATCH V2 5/5] blk-mq: remove blk_mq_complete_request_sync Ming Lei
2019-07-30  0:45 ` Ming Lei [this message]
2019-08-01  1:15   ` [PATCH V2 0/5] blk-mq: wait until completed req's complete fn is run Sagi Grimberg
2019-08-01  2:45     ` Jens Axboe
2019-08-01 14:28       ` Sagi Grimberg
2019-08-02 13:34 ` Jens Axboe

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=20190730004525.GB28708@ming.t460p \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=maxg@mellanox.com \
    --cc=sagi@grimberg.me \
    /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).