linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC v3 00/22] blk-mq/libata/scsi: SCSI driver tagging improvements Part I
@ 2022-10-25 10:17 John Garry
  2022-10-25 10:11 ` John Garry
                   ` (22 more replies)
  0 siblings, 23 replies; 44+ messages in thread
From: John Garry @ 2022-10-25 10:17 UTC (permalink / raw)
  To: axboe, damien.lemoal, jejb, martin.petersen, jinpu.wang, hare,
	bvanassche, hch, ming.lei, niklas.cassel
  Cc: linux-block, linux-kernel, linux-ide, linux-scsi, linuxarm, John Garry

Currently SCSI low-level drivers are required to manage tags for commands
which do not come via the block layer - libata internal commands would be
an example of one of these. We want to make blk-mq manage these tags also.

There was some work to provide "reserved commands" support in such series
as https://lore.kernel.org/linux-scsi/20211125151048.103910-1-hare@suse.de/

This was based on allocating a request for the lifetime of the "internal"
command.

This series tries to solve that problem by not just allocating the request
but also sending it as a request through the block layer. Reasons to do
this:
- Normal flow of a request and also commonality for regular scsi command
  lifetime
- We don't leave request and scsi_cmnd fields dangling as when we just
  allocate and free the request for the lifetime of the "internal" command
- For poll mode support we can only poll in block layer, so could not send
  internal commands on poll mode queues if we did not do this, which is a
  problem
- Can get rid of duplicated code like libsas internal command timeout
  handling

Series part I contains core SCSI midlayer, libata, and libsas changes to
queue libsas "slow" tasks as requests.

Series part II of this series focused on changing libata to queue internal
commands as requests.

Testing:
QEMU with AHCI with disk and cdrom attached, hisi_sas, pm8001.

Branch containing all patches is at:
https://github.com/hisilicon/kernel-dev/commits/private-topic-sas-6.1-block

v2 was here:
https://lore.kernel.org/linux-scsi/1654770559-101375-1-git-send-email-john.garry@huawei.com/

Hannes Reinecke (1):
  scsi: core: Implement reserved command handling

John Garry (21):
  blk-mq: Don't get budget for reserved requests
  scsi: core: Add scsi_get_dev()
  scsi: core: Add support to send reserved commands
  scsi: core: Add support for reserved command timeout handling
  scsi: libsas: Improve sas_ex_discover_expander() error handling
  scsi: libsas: Notify LLDD expander found before calling sas_rphy_add()
  scsi: scsi_transport_sas: Alloc sdev for expander
  scsi: libsas: Add sas_alloc_slow_task_rq()
  scsi: libsas: Add sas_queuecommand_internal()
  scsi: libsas: Add sas_internal_timeout()
  scsi: core: Use SCSI_SCAN_RESCAN in  __scsi_add_device()
  scsi: scsi_transport_sas: Allocate end device target id in the rphy
    alloc
  ata: libata-scsi: Add ata_scsi_setup_sdev()
  scsi: libsas: Add sas_ata_setup_device()
  ata: libata-scsi: Allocate sdev early in port probe
  scsi: libsas drivers: Reserve tags
  scsi: libsas: Queue SMP commands as requests
  scsi: libsas: Queue TMF commands as requests
  scsi: core: Add scsi_alloc_request_hwq()
  scsi: libsas: Queue internal abort commands as requests
  scsi: libsas: Delete sas_task_slow.timer

 block/blk-mq.c                         |   4 +-
 drivers/ata/libata-eh.c                |   1 +
 drivers/ata/libata-scsi.c              |  49 ++++++++----
 drivers/ata/libata.h                   |   1 +
 drivers/scsi/aic94xx/aic94xx_init.c    |   3 +
 drivers/scsi/hisi_sas/hisi_sas_main.c  |  40 +++++-----
 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c |   3 +
 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c |   3 +
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c |   7 ++
 drivers/scsi/hosts.c                   |  16 ++++
 drivers/scsi/isci/init.c               |   3 +
 drivers/scsi/libsas/sas_ata.c          |  20 +++++
 drivers/scsi/libsas/sas_expander.c     | 101 ++++++++++++++-----------
 drivers/scsi/libsas/sas_init.c         |  61 ++++++++++++++-
 drivers/scsi/libsas/sas_internal.h     |   5 ++
 drivers/scsi/libsas/sas_scsi_host.c    |  93 ++++++++++++-----------
 drivers/scsi/mvsas/mv_init.c           |   7 ++
 drivers/scsi/pm8001/pm8001_init.c      |   8 +-
 drivers/scsi/scsi_error.c              |   3 +
 drivers/scsi/scsi_lib.c                |  42 +++++++++-
 drivers/scsi/scsi_scan.c               |  29 ++++++-
 drivers/scsi/scsi_transport_sas.c      |  34 ++++++---
 include/linux/libata.h                 |   2 +
 include/scsi/libsas.h                  |   8 +-
 include/scsi/scsi_cmnd.h               |   3 +
 include/scsi/scsi_host.h               |  21 ++++-
 26 files changed, 424 insertions(+), 143 deletions(-)

-- 
2.35.3


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

end of thread, other threads:[~2022-11-07 10:20 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 10:17 [PATCH RFC v3 00/22] blk-mq/libata/scsi: SCSI driver tagging improvements Part I John Garry
2022-10-25 10:11 ` John Garry
2022-10-25 10:17 ` [PATCH RFC v3 01/22] blk-mq: Don't get budget for reserved requests John Garry
2022-10-27  1:16   ` Damien Le Moal
2022-10-27  9:09     ` John Garry
2022-10-25 10:17 ` [PATCH RFC v3 02/22] scsi: core: Add scsi_get_dev() John Garry
2022-10-25 10:17 ` [PATCH RFC v3 03/22] scsi: core: Implement reserved command handling John Garry
2022-10-27  1:18   ` Damien Le Moal
2022-10-27  7:51     ` Hannes Reinecke
2022-10-27  8:16       ` John Garry
2022-10-27  9:11     ` John Garry
2022-10-25 10:17 ` [PATCH RFC v3 04/22] scsi: core: Add support to send reserved commands John Garry
2022-10-27  1:21   ` Damien Le Moal
2022-10-27  9:13     ` John Garry
2022-10-27  9:18       ` Damien Le Moal
2022-10-25 10:17 ` [PATCH RFC v3 05/22] scsi: core: Add support for reserved command timeout handling John Garry
2022-10-25 10:18 ` [PATCH RFC v3 06/22] scsi: libsas: Improve sas_ex_discover_expander() error handling John Garry
2022-10-25 10:18 ` [PATCH RFC v3 07/22] scsi: libsas: Notify LLDD expander found before calling sas_rphy_add() John Garry
2022-10-25 10:18 ` [PATCH RFC v3 08/22] scsi: scsi_transport_sas: Alloc sdev for expander John Garry
2022-10-25 10:18 ` [PATCH RFC v3 09/22] scsi: libsas: Add sas_alloc_slow_task_rq() John Garry
2022-10-25 10:18 ` [PATCH RFC v3 10/22] scsi: libsas: Add sas_queuecommand_internal() John Garry
2022-10-25 10:18 ` [PATCH RFC v3 11/22] scsi: libsas: Add sas_internal_timeout() John Garry
2022-10-25 10:18 ` [PATCH RFC v3 12/22] scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device() John Garry
2022-10-25 10:18 ` [PATCH RFC v3 13/22] scsi: scsi_transport_sas: Allocate end device target id in the rphy alloc John Garry
2022-10-25 10:18 ` [PATCH RFC v3 14/22] ata: libata-scsi: Add ata_scsi_setup_sdev() John Garry
2022-10-25 10:18 ` [PATCH RFC v3 15/22] scsi: libsas: Add sas_ata_setup_device() John Garry
2022-10-25 10:18 ` [PATCH RFC v3 16/22] ata: libata-scsi: Allocate sdev early in port probe John Garry
2022-10-27  1:34   ` Damien Le Moal
2022-10-27  8:11     ` Hannes Reinecke
2022-10-27  9:16       ` Damien Le Moal
2022-10-27  9:51         ` Hannes Reinecke
2022-11-07 10:09           ` John Garry
2022-11-07 10:20             ` Hannes Reinecke
2022-10-25 10:18 ` [PATCH RFC v3 17/22] scsi: libsas drivers: Reserve tags John Garry
2022-10-25 10:18 ` [PATCH RFC v3 18/22] scsi: libsas: Queue SMP commands as requests John Garry
2022-10-27  1:36   ` Damien Le Moal
2022-10-27 10:45     ` John Garry
2022-10-25 10:18 ` [PATCH RFC v3 19/22] scsi: libsas: Queue TMF " John Garry
2022-10-25 10:18 ` [PATCH RFC v3 20/22] scsi: core: Add scsi_alloc_request_hwq() John Garry
2022-10-25 10:18 ` [PATCH RFC v3 21/22] scsi: libsas: Queue internal abort commands as requests John Garry
2022-10-29  1:15   ` chenxiang (M)
2022-11-02 10:04     ` John Garry
2022-11-03  3:09       ` chenxiang (M)
2022-10-25 10:18 ` [PATCH RFC v3 22/22] scsi: libsas: Delete sas_task_slow.timer John Garry

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