All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/11] Fix race conditions related to stopping block layer queues
@ 2016-10-18 21:48 ` Bart Van Assche
  0 siblings, 0 replies; 80+ messages in thread
From: Bart Van Assche @ 2016-10-18 21:48 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Christoph Hellwig, James Bottomley, Martin K. Petersen,
	Mike Snitzer, Doug Ledford, Keith Busch, Ming Lin,
	Laurence Oberman, linux-block, linux-scsi, linux-rdma,
	linux-nvme

Hello Jens,

Multiple block drivers need the functionality to stop a request queue 
and to wait until all ongoing request_fn() / queue_rq() calls have 
finished without waiting until all outstanding requests have finished. 
Hence this patch series that introduces the blk_mq_quiesce_queue() and 
blk_mq_resume_queue() functions. The dm-mq, SRP and NVMe patches in this 
patch series are three examples of where these functions are useful. 
These patches have been tested on top of kernel v4.9-rc1. The following 
tests have been run to verify this patch series:
- My own srp-test suite that stress-tests SRP on top of dm-multipath.
- Mike's mptest suite that stress-tests dm-multipath.
- fio on top of the NVMeOF host driver that was connected to the NVMeOF
   target driver on the same host.
- Laurence verified the previous version (v2) of this patch series by
   running it through the Red Hat SRP test suite. Laurence also ran some
   NVMe tests (thanks Laurence!).

The changes compared to the second version of this patch series are:
- Changed the order of the patches in this patch series.
- Added several new patches: a patch that avoids that .queue_rq() gets
   invoked from the direct submission path if a queue has been stopped
   and also a patch that introduces the helper function
   blk_mq_hctx_stopped().
- blk_mq_quiesce_queue() has been reworked (thanks to Ming Lin and Sagi
   for their feedback).
- A bool 'kick' argument has been added to blk_mq_requeue_request().
- As proposed by Christoph, the code that waits for queuecommand() has
   been moved from the SRP transport driver to the SCSI core.

Changes between v2 and v1:
- Dropped the non-blk-mq changes from this patch series.
- Added support for harware queues with BLK_MQ_F_BLOCKING set.
- Added a call stack to the description of the dm race fix patch.
- Dropped the non-scsi-mq changes from the SRP patch.
- Added a patch that introduces blk_mq_queue_stopped() in the dm driver.

The individual patches in this series are:

0001-blk-mq-Do-not-invoke-.queue_rq-for-a-stopped-queue.patch
0002-blk-mq-Introduce-blk_mq_hctx_stopped.patch
0003-blk-mq-Introduce-blk_mq_queue_stopped.patch
0004-blk-mq-Introduce-blk_mq_quiesce_queue.patch
0005-blk-mq-Add-a-kick_requeue_list-argument-to-blk_mq_re.patch
0006-dm-Use-BLK_MQ_S_STOPPED-instead-of-QUEUE_FLAG_STOPPE.patch
0007-dm-Fix-a-race-condition-related-to-stopping-and-star.patch
0008-SRP-transport-Move-queuecommand-wait-code-to-SCSI-co.patch
0009-SRP-transport-scsi-mq-Wait-for-.queue_rq-if-necessar.patch
0010-nvme-Use-BLK_MQ_S_STOPPED-instead-of-QUEUE_FLAG_STOP.patch
0011-nvme-Fix-a-race-condition.patch

Thanks,

Bart.

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

end of thread, other threads:[~2016-10-20 15:35 UTC | newest]

Thread overview: 80+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-18 21:48 [PATCH v3 0/11] Fix race conditions related to stopping block layer queues Bart Van Assche
2016-10-18 21:48 ` Bart Van Assche
2016-10-18 21:48 ` [PATCH v3 01/11] blk-mq: Do not invoke .queue_rq() for a stopped queue Bart Van Assche
2016-10-18 21:48   ` Bart Van Assche
2016-10-19 13:17   ` Christoph Hellwig
2016-10-19 13:17     ` Christoph Hellwig
2016-10-19 13:17     ` Christoph Hellwig
2016-10-19 23:48   ` Ming Lei
2016-10-19 23:48     ` Ming Lei
2016-10-19 23:48     ` Ming Lei
2016-10-18 21:49 ` [PATCH v3 02/11] blk-mq: Introduce blk_mq_hctx_stopped() Bart Van Assche
2016-10-18 21:49   ` Bart Van Assche
2016-10-19 13:19   ` Christoph Hellwig
2016-10-19 13:19     ` Christoph Hellwig
2016-10-19 13:19     ` Christoph Hellwig
2016-10-19 15:58     ` Bart Van Assche
2016-10-19 15:58       ` Bart Van Assche
2016-10-18 21:49 ` [PATCH v3 03/11] blk-mq: Introduce blk_mq_queue_stopped() Bart Van Assche
2016-10-18 21:49   ` Bart Van Assche
2016-10-19 13:19   ` Christoph Hellwig
2016-10-19 13:19     ` Christoph Hellwig
2016-10-19 13:19     ` Christoph Hellwig
2016-10-18 21:50 ` [PATCH v3 04/11] blk-mq: Introduce blk_mq_quiesce_queue() Bart Van Assche
2016-10-18 21:50   ` Bart Van Assche
2016-10-19 13:23   ` Christoph Hellwig
2016-10-19 13:23     ` Christoph Hellwig
2016-10-19 13:23     ` Christoph Hellwig
2016-10-19 16:13     ` Bart Van Assche
2016-10-19 16:13       ` Bart Van Assche
2016-10-19 21:04   ` Bart Van Assche
2016-10-19 21:04     ` Bart Van Assche
2016-10-19 23:47     ` Ming Lei
2016-10-19 23:47       ` Ming Lei
2016-10-18 21:51 ` [PATCH v3 05/11] blk-mq: Add a kick_requeue_list argument to blk_mq_requeue_request() Bart Van Assche
2016-10-18 21:51   ` Bart Van Assche
2016-10-18 21:51   ` Bart Van Assche
2016-10-19 13:23   ` Christoph Hellwig
2016-10-19 13:23     ` Christoph Hellwig
2016-10-19 13:23     ` Christoph Hellwig
2016-10-18 21:51 ` [PATCH v3 06/11] dm: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code Bart Van Assche
2016-10-18 21:51   ` Bart Van Assche
2016-10-19 13:28   ` Christoph Hellwig
2016-10-19 13:28     ` Christoph Hellwig
2016-10-19 13:28     ` Christoph Hellwig
2016-10-18 21:52 ` [PATCH v3 07/11] dm: Fix a race condition related to stopping and starting queues Bart Van Assche
2016-10-18 21:52   ` Bart Van Assche
2016-10-19 13:30   ` Christoph Hellwig
2016-10-19 13:30     ` Christoph Hellwig
2016-10-19 13:30     ` Christoph Hellwig
2016-10-18 21:52 ` [PATCH v3 08/11] SRP transport: Move queuecommand() wait code to SCSI core Bart Van Assche
2016-10-18 21:52   ` Bart Van Assche
2016-10-19 13:38   ` Christoph Hellwig
2016-10-19 13:38     ` Christoph Hellwig
2016-10-19 13:38     ` Christoph Hellwig
2016-10-18 21:52 ` [PATCH v3 09/11] SRP transport, scsi-mq: Wait for .queue_rq() if necessary Bart Van Assche
2016-10-18 21:52   ` Bart Van Assche
2016-10-19 13:39   ` Christoph Hellwig
2016-10-19 13:39     ` Christoph Hellwig
2016-10-19 13:39     ` Christoph Hellwig
2016-10-18 21:53 ` [PATCH v3 10/11] nvme: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code Bart Van Assche
2016-10-18 21:53   ` Bart Van Assche
2016-10-19 13:39   ` Christoph Hellwig
2016-10-19 13:39     ` Christoph Hellwig
2016-10-19 13:39     ` Christoph Hellwig
2016-10-18 21:53 ` [PATCH v3 11/11] nvme: Fix a race condition Bart Van Assche
2016-10-18 21:53   ` Bart Van Assche
2016-10-19 13:41   ` Christoph Hellwig
2016-10-19 13:41     ` Christoph Hellwig
2016-10-19 13:41     ` Christoph Hellwig
2016-10-18 21:56 ` [PATCH v3 0/11] Fix race conditions related to stopping block layer queues Bart Van Assche
2016-10-18 21:56   ` Bart Van Assche
2016-10-18 21:56   ` Bart Van Assche
2016-10-19 22:24 ` Keith Busch
2016-10-19 22:24   ` Keith Busch
2016-10-19 23:51   ` Bart Van Assche
2016-10-19 23:51     ` Bart Van Assche
2016-10-20 14:52     ` Keith Busch
2016-10-20 14:52       ` Keith Busch
2016-10-20 15:35       ` Bart Van Assche
2016-10-20 15:35         ` Bart Van Assche

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.