linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/5] blk-mq:  Wait for for hctx inflight requests on CPU unplug
@ 2019-05-27 15:02 Ming Lei
  2019-05-27 15:02 ` [PATCH V2 1/5] scsi: select reply queue from request's CPU Ming Lei
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Ming Lei @ 2019-05-27 15:02 UTC (permalink / raw)
  To: Jens Axboe, Martin K . Petersen
  Cc: linux-block, James Bottomley, linux-scsi, Bart Van Assche,
	Hannes Reinecke, John Garry, Keith Busch, Thomas Gleixner,
	Don Brace, Kashyap Desai, Sathya Prakash, Christoph Hellwig,
	Ming Lei

Hi,

blk-mq drivers often use managed IRQ, which affinity is setup
automatically by genirq core.

For managed IRQ, we need to make sure that there isn't in-flight
requests when the managed IRQ is going to shutdown.

This patch waits for inflight requests associated with one
going-to-shutdown managed IRQ in blk-mq's CPU hotplug handler.

One special case is that some SCSI devices have multiple private
completion(reply) queue even though they only have one blk-mq hw queue,
and the private completion queue is associated with one managed
IRQ. Wait for inflight requests for these SCSI device too if last
CPU of the completion queue is going to shutdown.

SCSI device's internal commands aren't covered in this patchset,
and they are much less important than requests from blk-mq/scsi
core.

V2:
	- cover private multiple completion(reply) queue
	- remove timeout during waitting, because some driver doesn't
	implemnt proper .timeout handler.


Ming Lei (5):
  scsi: select reply queue from request's CPU
  blk-mq: introduce .complete_queue_affinity
  scsi: core: implement callback of .complete_queue_affinity
  scsi: implement .complete_queue_affinity
  blk-mq: Wait for for hctx inflight requests on CPU unplug

 block/blk-mq-tag.c                          |  2 +-
 block/blk-mq-tag.h                          |  5 ++
 block/blk-mq.c                              | 94 +++++++++++++++++++--
 drivers/scsi/hisi_sas/hisi_sas_main.c       |  5 +-
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c      | 11 +++
 drivers/scsi/hpsa.c                         | 14 ++-
 drivers/scsi/megaraid/megaraid_sas_base.c   | 10 +++
 drivers/scsi/megaraid/megaraid_sas_fusion.c |  4 +-
 drivers/scsi/mpt3sas/mpt3sas_base.c         | 16 ++--
 drivers/scsi/mpt3sas/mpt3sas_scsih.c        | 11 +++
 drivers/scsi/scsi_lib.c                     | 14 +++
 include/linux/blk-mq.h                      | 12 ++-
 include/scsi/scsi_cmnd.h                    | 11 +++
 include/scsi/scsi_host.h                    | 10 +++
 14 files changed, 197 insertions(+), 22 deletions(-)

-- 
2.20.1


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

end of thread, other threads:[~2019-05-30  9:45 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27 15:02 [PATCH V2 0/5] blk-mq: Wait for for hctx inflight requests on CPU unplug Ming Lei
2019-05-27 15:02 ` [PATCH V2 1/5] scsi: select reply queue from request's CPU Ming Lei
2019-05-28  5:43   ` Hannes Reinecke
2019-05-28 10:33   ` John Garry
2019-05-29  2:36     ` Ming Lei
2019-05-27 15:02 ` [PATCH V2 2/5] blk-mq: introduce .complete_queue_affinity Ming Lei
2019-05-27 15:02 ` [PATCH V2 3/5] scsi: core: implement callback of .complete_queue_affinity Ming Lei
2019-05-27 15:02 ` [PATCH V2 4/5] scsi: implement .complete_queue_affinity Ming Lei
2019-05-27 15:02 ` [PATCH V2 5/5] blk-mq: Wait for for hctx inflight requests on CPU unplug Ming Lei
2019-05-28 16:50   ` John Garry
2019-05-29  2:28     ` Ming Lei
2019-05-29  2:42       ` Ming Lei
2019-05-29  9:42         ` John Garry
2019-05-29 10:10           ` Ming Lei
2019-05-29 15:33             ` Ming Lei
2019-05-29 16:10               ` John Garry
2019-05-30  2:28                 ` Ming Lei
2019-05-30  4:11                   ` Ming Lei
2019-05-30  9:31                   ` John Garry
2019-05-30  9:45                     ` Ming Lei

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).