An error occurred fetching the project authors.
  1. 06 Feb, 2019 4 commits
    • James Smart's avatar
      scsi: lpfc: Partition XRI buffer list across Hardware Queues · 5e5b511d
      James Smart authored
      Once the IO buff allocations were made shared, there was a single XRI
      buffer list shared by all hardware queues.  A single list isn't great for
      performance when shared across the per-cpu hardware queues.
      
      Create a separate XRI IO buffer get/put list for each Hardware Queue.  As
      SGLs and associated IO buffers get allocated/posted to the firmware; round
      robin their assignment across all available hardware Queues so that there
      is an equitable assignment.
      
      Modify SCSI and NVME IO submit code paths to use the Hardware Queue logic
      for XRI allocation.
      
      Add a debugfs interface to display hardware queue statistics
      
      Added new empty_io_bufs counter to track if a cpu runs out of XRIs.
      
      Replace common_ variables/names with io_ to make meanings clearer.
      Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      5e5b511d
    • James Smart's avatar
      scsi: lpfc: Replace io_channels for nvme and fcp with general hdw_queues per cpu · cdb42bec
      James Smart authored
      Currently, both nvme and fcp each have their own concept of an io_channel,
      which is a combination wq/cq and associated msix.  Different cpus would
      share an io_channel.
      
      The driver is now moving to per-cpu wq/cq pairs and msix vectors.  The
      driver will still use separate wq/cq pairs per protocol on each cpu, but
      the protocols will share the msix vector.
      
      Given the elimination of the nvme and fcp io channels, the module
      parameters will be removed.  A new parameter, lpfc_hdw_queue is added which
      allows the wq/cq pair allocation per cpu to be overridden and allocated to
      lesser value. If lpfc_hdw_queue is zero, the number of pairs allocated will
      be based on the number of cpus. If non-zero, the parameter specifies the
      number of queues to allocate. At this time, the maximum non-zero value is
      64.
      
      To manage this new paradigm, a new hardware queue structure is created to
      track queue activity and relationships.
      
      As MSIX vector allocation must be known before setting up the
      relationships, msix allocation now occurs before queue datastructures are
      allocated. If the number of vectors allocated is less than the desired
      hardware queues, the hardware queue counts will be reduced to the number of
      vectors
      Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      cdb42bec
    • James Smart's avatar
      scsi: lpfc: Remove extra vector and SLI4 queue for Expresslane · 7370d10a
      James Smart authored
      There is a extra queue and msix vector for expresslane. Now that the driver
      will be doing queues per cpu, this oddball queue is no longer needed.
      Expresslane will utilize the normal per-cpu queues.
      
      Updated debugfs sli4 queue output to go along with the change
      Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      7370d10a
    • James Smart's avatar
      scsi: lpfc: Implement common IO buffers between NVME and SCSI · 0794d601
      James Smart authored
      Currently, both NVME and SCSI get their IO buffers from separate
      pools. XRI's are associated 1:1 with IO buffers, so XRI's are also split
      between protocols.
      
      Eliminate the independent pools and use a single pool. Each buffer
      structure now has a common section and a protocol section. Per protocol
      routines for SGL initialization are removed and replaced by common
      routines. Initialization of the buffers is only done on the common area.
      All other fields, which are protocol specific, are initialized when the
      buffer is allocated for use in the per-protocol allocation routine.
      
      In the past, the SCSI side allocated IO buffers as part of slave_alloc
      calls until the maximum XRIs for SCSI was reached. As all XRIs are now
      common and may be used for either protocol, allocation for everything is
      done as part of adapter initialization and the scsi side has no action in
      slave alloc.
      
      As XRI's are no longer split, the lpfc_xri_split module parameter is
      removed.
      
      Adapters based on SLI3 will continue to use the older scsi_buf_list_get/put
      routines.  All SLI4 adapters utilize the new IO buffer scheme
      Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      0794d601
  2. 20 Dec, 2018 1 commit
    • James Smart's avatar
      scsi: lpfc: Adding ability to reset chip via pci bus reset · 5021267a
      James Smart authored
      This patch adds a "pci_bus_reset" option to the board_mode sysfs attribute.
      This option uses the pci_reset_bus() api to reset the PCIe link the adapter
      is on, which will reset the chip/adapter.  Prior to issuing this option,
      all functions on the same chip must be placed in the offline state by the
      admin. After the reset, all of the instances may be brought online again.
      
      The primary purpose of this functionality is to support cases where
      firmware update required a chip reset but the admin did not want to reboot
      the machine in order to instantiate the firmware update.
      
      Sanity checks take place prior to the reset to ensure the adapter is the
      sole entity on the PCIe bus and that all functions are in the offline
      state.
      Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      5021267a
  3. 19 Dec, 2018 1 commit
  4. 08 Dec, 2018 2 commits
  5. 07 Nov, 2018 1 commit
  6. 12 Sep, 2018 2 commits
  7. 30 Aug, 2018 1 commit
  8. 02 Aug, 2018 2 commits
    • James Smart's avatar
      scsi: lpfc: Limit tracking of tgt queue depth in fast path · 2a5b7d62
      James Smart authored
      Performance is affected when target queue depth is tracked.  An atomic
      counter is incremented on the submission path which competes with it being
      decremented on the completion path.  In addition, multiple CPUs can
      simultaniously be manipulating this counter for the same ndlp.
      
      Reduce the overhead by only performing the target increment/decrement when
      the target queue depth is less than the overall adapter depth, thus is
      actually meaningful.
      Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      2a5b7d62
    • James Smart's avatar
      scsi: lpfc: Fix list corruption on the completion queue. · 8931c73b
      James Smart authored
      Enabling list_debug showed the drivers txcmplq was suffering list
      corruption. The systems will eventually crash because the iocb free list
      gets crossed linked with the prings txcmplq.  Most systems will run for a
      while after the corruption, but will eventually crash when a scsi eh reset
      occurs and the txcmplq is attempted to be flushed. The flush gets stuck in
      an endless loop.
      
      The problem is the abort handler does not hold the sli4 ring lock while
      validating the IO so the IO could complete while the driver is still
      preping the abort.  The erroneously generated abort, when it completes, has
      pointers to the original IO that has already completed, and the IO
      manipulation (for the second time) corrupts the list.
      
      Correct by taking the ring lock early in the abort handler so the erroneous
      abort won't be sent if the io has/is completing.
      Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      8931c73b
  9. 11 Jul, 2018 3 commits
  10. 08 May, 2018 1 commit
  11. 18 Apr, 2018 2 commits
  12. 13 Mar, 2018 1 commit
  13. 23 Feb, 2018 1 commit
  14. 12 Feb, 2018 3 commits
  15. 01 Nov, 2017 1 commit
  16. 07 Aug, 2017 1 commit
  17. 03 Jul, 2017 1 commit
  18. 13 Jun, 2017 1 commit
  19. 07 Mar, 2017 2 commits
    • James Smart's avatar
      scsi: lpfc: add transport eh_timed_out reference · 856984b7
      James Smart authored
      Christoph's prior patch missed the template for the sli3 adapters,
      which is now the "no host reset" template. Add the transport
      eh_timed_out handler to the no host reset template
      Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      856984b7
    • James Smart's avatar
      scsi: lpfc: Fix eh_deadline setting for sli3 adapters. · 96418b5e
      James Smart authored
      A previous change unilaterally removed the hba reset entry point
      from the sli3 host template. This was done to allow tape devices
      being used for back up from being removed. Why was this done ?
      When there was non-responding device on the fabric, the error
      escalation policy would escalate to the reset handler. When the
      reset handler was called, it would reset the adapter, dropping
      link, thus logging out and terminating all i/o's - on any target.
      If there was a tape device on the same adapter that wasn't in
      error, it would kill the tape i/o's, effectively killing the
      tape device state.  With the reset point removed, the adapter
      reset avoided the fabric logout, allowing the other devices to
      continue to operate unaffected. A hack - yes. Hint: we really
      need a transport I_T nexus reset callback added to the eh process
      (in between the SCSI target reset and hba reset points), so a
      fc logout could occur to the one bad target only and stop the error
      escalation process.
      
      This patch commonizes the approach so it can be used for sli3 and sli4
      adapters, but mandates the admin, via module parameter, specifically
      identify which adapters the resets are to be removed for. Additionally,
      bus_reset, which sends Target Reset TMFs to all targets, is also removed
      from the template as it too has the same effect as the adapter reset.
      Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
      Reviewed-by: default avatarLaurence Oberman <loberman@redhat.com>
      Tested-by: default avatarLaurence Oberman <loberman@redhat.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      96418b5e
  20. 22 Feb, 2017 4 commits
  21. 07 Feb, 2017 1 commit
  22. 05 Jan, 2017 1 commit
  23. 30 Nov, 2016 1 commit
  24. 08 Nov, 2016 2 commits