All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] blk-mq: wait until completed req's complete fn is run
@ 2019-07-22  5:39 ` Ming Lei
  0 siblings, 0 replies; 50+ messages in thread
From: Ming Lei @ 2019-07-22  5:39 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-block, linux-nvme, Ming Lei, Max Gurtovoy, Sagi Grimberg,
	Keith Busch, Christoph Hellwig

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.

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/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 ++-
 8 files changed, 61 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>

-- 
2.20.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2019-07-24  2:05 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-22  5:39 [PATCH 0/5] blk-mq: wait until completed req's complete fn is run Ming Lei
2019-07-22  5:39 ` Ming Lei
2019-07-22  5:39 ` [PATCH 1/5] blk-mq: introduce blk_mq_request_completed() Ming Lei
2019-07-22  5:39   ` Ming Lei
2019-07-23 20:26   ` Sagi Grimberg
2019-07-23 20:26     ` Sagi Grimberg
2019-07-22  5:39 ` [PATCH 2/5] blk-mq: introduce blk_mq_tagset_wait_completed_request() Ming Lei
2019-07-22  5:39   ` Ming Lei
2019-07-22 15:25   ` Bart Van Assche
2019-07-22 15:25     ` Bart Van Assche
2019-07-23  1:06     ` Ming Lei
2019-07-23  1:06       ` Ming Lei
2019-07-23 20:54       ` Bart Van Assche
2019-07-23 20:54         ` Bart Van Assche
2019-07-24  1:34         ` Ming Lei
2019-07-24  1:34           ` Ming Lei
2019-07-23 20:27   ` Sagi Grimberg
2019-07-23 20:27     ` Sagi Grimberg
2019-07-22  5:39 ` [PATCH 3/5] nvme: don't abort completed request in nvme_cancel_request Ming Lei
2019-07-22  5:39   ` Ming Lei
2019-07-22 15:27   ` Bart Van Assche
2019-07-22 15:27     ` Bart Van Assche
2019-07-22 23:22     ` Keith Busch
2019-07-22 23:22       ` Keith Busch
2019-07-23  0:07       ` Sagi Grimberg
2019-07-23  0:07         ` Sagi Grimberg
2019-07-23  1:08     ` Ming Lei
2019-07-23  1:08       ` Ming Lei
2019-07-23 19:22       ` Bart Van Assche
2019-07-23 19:22         ` Bart Van Assche
2019-07-23 20:27   ` Sagi Grimberg
2019-07-23 20:27     ` Sagi Grimberg
2019-07-22  5:39 ` [PATCH 4/5] nvme: wait until all completed request's complete fn is called Ming Lei
2019-07-22  5:39   ` Ming Lei
2019-07-23 16:14   ` Dongli Zhang
2019-07-23 16:14     ` Dongli Zhang
2019-07-24  2:05     ` Ming Lei
2019-07-24  2:05       ` Ming Lei
2019-07-23 20:29   ` Sagi Grimberg
2019-07-23 20:29     ` Sagi Grimberg
2019-07-24  1:43     ` Ming Lei
2019-07-24  1:43       ` Ming Lei
2019-07-22  5:39 ` [PATCH 5/5] blk-mq: remove blk_mq_complete_request_sync Ming Lei
2019-07-22  5:39   ` Ming Lei
2019-07-23 20:30   ` Sagi Grimberg
2019-07-23 20:30     ` Sagi Grimberg
2019-07-22 23:27 ` [PATCH 0/5] blk-mq: wait until completed req's complete fn is run Bob Liu
2019-07-22 23:27   ` Bob Liu
2019-07-23  1:10   ` Ming Lei
2019-07-23  1:10     ` Ming Lei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.