public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/13] Introduce support for multiqueue (MQ) in fnic
@ 2023-10-27 18:02 Karan Tilak Kumar
  2023-10-27 18:02 ` [PATCH v2 01/13] scsi: fnic: Modify definitions to sync with VIC firmware Karan Tilak Kumar
                   ` (13 more replies)
  0 siblings, 14 replies; 46+ messages in thread
From: Karan Tilak Kumar @ 2023-10-27 18:02 UTC (permalink / raw)
  To: sebaddel
  Cc: arulponn, djhawar, gcboffa, mkai2, satishkh, jejb,
	martin.petersen, linux-scsi, linux-kernel, Karan Tilak Kumar

Hi Martin,

This cover letter describes the feature: add support for multiqueue (MQ)
to fnic driver.

Background: The Virtual Interface Card (VIC) firmware exposes several
queues that can be configured for sending IOs and receiving IO
responses. Unified Computing System Manager (UCSM) and Intersight
Manager (IMM) allows users to configure the number of queues to be
used for IOs.

The number of IO queues to be used is stored in a configuration file
by the VIC firmware. The fNIC driver reads the configuration file and sets
the number of queues to be used. Previously, the driver was hard-coded
to use only one queue. With this set of changes, the fNIC driver will
configure itself to use multiple queues. This feature takes advantage of
the block multiqueue layer to parallelize IOs being sent out of the VIC
card.

Here's a brief description of some of the salient patches:

- vnic_scsi.h needs to be in sync with VIC firmware to be able to read
the number of queues from the firmware config file. A patch has been
created for this.
- In an environment with many fnics (like we see in our customer
environments), it is hard to distinguish which fnic is printing logs.
Therefore, an fnic number has been included in the logs.
- read the number of queues from the firmware config file.
- include definitions in fnic.h to support multiqueue.
- modify the interrupt service routines (ISRs) to read from the
correct registers. The numbers that are used here come from discussions
with the VIC firmware team.
- track IO statistics for different queues.
- remove usage of host_lock, and only use fnic_lock in the fnic driver.
- use a hardware queue based spinlock to protect io_req.
- replace the hard-coded zeroth queue with a hardware queue number.
This presents a bulk of the changes.
- modify the definition of fnic_queuecommand to accept multiqueue tags.
- improve log messages, and indicate fnic number and multiqueue tags for
effective debugging.

Even though the patches have been made into a series, some patches are
heavier than others.
But, every effort has been made to keep the purpose of each patch as
a single-purpose, and to compile cleanly.

This patchset has been tested as a whole. Therefore, the tested-by fields
have been added only to the last two patches
in the set. All the individual patches compile cleanly. However,
I've refrained from adding tested-by to
most of the patches, so as to not mislead the reviewer/reader.

A brief note on the unit tests:

1. Increase number of queues to 64. Load driver. Run IOs via Medusa.
12+ hour run successful.
2. Configure multipathing, and run link flaps on single link.
IOs drop briefly, but pick up as expected.
3. Configure multipathing, and run link flaps on two links, with a
30 second delay in between. IOs drop briefly, but pick up as expected.

Repeat the above tests with single queue. All tests were successful.

Please consider this patch series for the next merge window.

Changes between v1 and v2:
	Suppress a warning raised by a kernel test bot,
	Incorporate the following review comments from Bart:
	Remove outdated comment,
	Remove unnecessary out of range tag checks,
	Remove unnecessary local variable,
	Modify function name.
 
Thanks and regards,
Karan

Karan Tilak Kumar (13):
  scsi: fnic: Modify definitions to sync with VIC firmware
  scsi: fnic: Add and use fnic number
  scsi: fnic: Add and improve log messages
  scsi: fnic: Rename wq_copy to hw_copy_wq
  scsi: fnic: Get copy workqueue count and interrupt mode from config
  scsi: fnic: Refactor and redefine fnic.h for multiqueue
  scsi: fnic: Modify ISRs to support multiqueue(MQ)
  scsi: fnic: Define stats to track multiqueue (MQ) IOs
  scsi: fnic: Remove usage of host_lock
  scsi: fnic: Add support for multiqueue (MQ) in fnic_main.c
  scsi: fnic: Use fnic_lock to protect fnic structures in queuecommand
  scsi: fnic: Add support for multiqueue (MQ) in fnic driver
  scsi: fnic: Improve logs and add support for multiqueue (MQ)

 drivers/scsi/fnic/fnic.h         |  42 +-
 drivers/scsi/fnic/fnic_debugfs.c |   2 +-
 drivers/scsi/fnic/fnic_fcs.c     |  36 +-
 drivers/scsi/fnic/fnic_io.h      |   2 +
 drivers/scsi/fnic/fnic_isr.c     | 166 +++++--
 drivers/scsi/fnic/fnic_main.c    | 156 ++++--
 drivers/scsi/fnic/fnic_res.c     |  48 +-
 drivers/scsi/fnic/fnic_scsi.c    | 789 ++++++++++++++++++-------------
 drivers/scsi/fnic/fnic_stats.h   |   3 +
 drivers/scsi/fnic/fnic_trace.c   |  11 +
 drivers/scsi/fnic/vnic_dev.c     |   4 +
 drivers/scsi/fnic/vnic_scsi.h    |  13 +-
 12 files changed, 823 insertions(+), 449 deletions(-)

-- 
2.31.1


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

end of thread, other threads:[~2023-11-07 19:54 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-27 18:02 [PATCH v2 00/13] Introduce support for multiqueue (MQ) in fnic Karan Tilak Kumar
2023-10-27 18:02 ` [PATCH v2 01/13] scsi: fnic: Modify definitions to sync with VIC firmware Karan Tilak Kumar
2023-11-02  7:23   ` Hannes Reinecke
2023-11-06 19:47     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 02/13] scsi: fnic: Add and use fnic number Karan Tilak Kumar
2023-11-02  7:25   ` Hannes Reinecke
2023-11-06 19:49     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 03/13] scsi: fnic: Add and improve log messages Karan Tilak Kumar
2023-11-02  7:27   ` Hannes Reinecke
2023-11-06 19:55     ` Karan Tilak Kumar (kartilak)
2023-11-07  7:20       ` Hannes Reinecke
2023-11-07 19:54         ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 04/13] scsi: fnic: Rename wq_copy to hw_copy_wq Karan Tilak Kumar
2023-11-02  7:28   ` Hannes Reinecke
2023-11-06 19:57     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 05/13] scsi: fnic: Get copy workqueue count and interrupt mode from config Karan Tilak Kumar
2023-11-02  7:29   ` Hannes Reinecke
2023-11-06 19:59     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 06/13] scsi: fnic: Refactor and redefine fnic.h for multiqueue Karan Tilak Kumar
2023-11-02  7:36   ` Hannes Reinecke
2023-11-06 20:11     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 07/13] scsi: fnic: Modify ISRs to support multiqueue(MQ) Karan Tilak Kumar
2023-11-02  7:45   ` Hannes Reinecke
2023-11-06 20:13     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 08/13] scsi: fnic: Define stats to track multiqueue (MQ) IOs Karan Tilak Kumar
2023-11-02  7:46   ` Hannes Reinecke
2023-10-27 18:02 ` [PATCH v2 09/13] scsi: fnic: Remove usage of host_lock Karan Tilak Kumar
2023-11-02  7:52   ` Hannes Reinecke
2023-11-06 20:20     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 10/13] scsi: fnic: Add support for multiqueue (MQ) in fnic_main.c Karan Tilak Kumar
2023-11-02  7:57   ` Hannes Reinecke
2023-10-27 18:03 ` [PATCH v2 11/13] scsi: fnic: Use fnic_lock to protect fnic structures in queuecommand Karan Tilak Kumar
2023-11-02  8:02   ` Hannes Reinecke
2023-10-27 18:03 ` [PATCH v2 12/13] scsi: fnic: Add support for multiqueue (MQ) in fnic driver Karan Tilak Kumar
2023-10-29 17:20   ` kernel test robot
2023-11-02  8:11   ` Hannes Reinecke
2023-11-06 20:25     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:03 ` [PATCH v2 13/13] scsi: fnic: Improve logs and add support for multiqueue (MQ) Karan Tilak Kumar
2023-11-02  7:59   ` Hannes Reinecke
2023-11-06 20:44     ` Karan Tilak Kumar (kartilak)
2023-11-07  7:27       ` Hannes Reinecke
2023-11-07 18:41         ` Karan Tilak Kumar (kartilak)
2023-11-02  8:14   ` Hannes Reinecke
2023-11-06 20:30     ` Karan Tilak Kumar (kartilak)
2023-11-02  9:00 ` [PATCH v2 00/13] Introduce support for multiqueue (MQ) in fnic John Garry
2023-11-06 19:44   ` Karan Tilak Kumar (kartilak)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox