~mreed8855/ubuntu/+source/linux/+git/impish:mpt3sas_update_38_100

Last commit made on 2021-08-04
Get this branch:
git clone -b mpt3sas_update_38_100 https://git.launchpad.net/~mreed8855/ubuntu/+source/linux/+git/impish
Only Michael Reed can upload to this branch. If you are Michael Reed please log in for upload directions.

Branch merges

Branch information

Name:
mpt3sas_update_38_100
Repository:
lp:~mreed8855/ubuntu/+source/linux/+git/impish

Recent commits

32086c4... by Michael Reed

Bump driver version to 38.100.00.00

fe97eb6... by Ming Lei <email address hidden>

scsi: core: Replace sdev->device_busy with sbitmap

SCSI currently uses an atomic variable to track queue depth for each
attached device. The queue depth depends on many factors such as transport
type and device implementation. In addition, the SCSI device queue depth is
not a static entity but changes over time as a result of congestion
management.

While blk-mq currently tracks queue depth for each hctx, it can't easily be
changed to accommodate the SCSI per-device requirement.

The current approach of using an atomic variable doesn't scale well when
there are lots of CPU cores and the disk is very fast. IOPS can be
substantially impacted by the atomic in the hot path.

Replace the atomic variable sdev->device_busy with an sbitmap for tracking
the SCSI device queue depth.

It has been observed that IOPS is improved ~30% by this patchset in the
following test:

1) test machine(32 logical CPU cores)
 Thread(s) per core: 2
 Core(s) per socket: 8
 Socket(s): 2
 NUMA node(s): 2
 Model name: Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz

2) setup scsi_debug:
modprobe scsi_debug virtual_gb=128 max_luns=1 submit_queues=32 delay=0 max_queue=256

3) fio script:
fio --rw=randread --size=128G --direct=1 --ioengine=libaio --iodepth=2048 \
 --numjobs=32 --bs=4k --group_reporting=1 --group_reporting=1 --runtime=60 \
 --loops=10000 --name=job1 --filename=/dev/sdN

[mkp: fix device_busy reference in mpt3sas]

Link: https://<email address hidden>
Link: https://<email address hidden>/
Cc: Omar Sandoval <email address hidden>
Cc: Kashyap Desai <email address hidden>
Cc: Sumanesh Samanta <email address hidden>
Cc: Ewan D. Milne <email address hidden>
Cc: Hannes Reinecke <email address hidden>
Tested-by: Sumanesh Samanta <email address hidden>
Reviewed-by: Hannes Reinecke <email address hidden>
Signed-off-by: Ming Lei <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 020b0f0a31920e5b7e7e120d4560453b67b70733)
Signed-off-by: Michael Reed <email address hidden>

ad37f18... by Ming Lei <email address hidden>

scsi: core: Add scsi_device_busy() wrapper

Add scsi_device_busy() helper to prepare drivers for tracking device queue
depth via sbitmap_queue.

Link: https://<email address hidden>
Cc: Omar Sandoval <email address hidden>
Cc: Kashyap Desai <email address hidden>
Cc: Sumanesh Samanta <email address hidden>
Cc: Ewan D. Milne <email address hidden>
Tested-by: Sumanesh Samanta <email address hidden>
Reviewed-by: Hannes Reinecke <email address hidden>
Signed-off-by: Ming Lei <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 8278807abd338f2246b6ae8057f2ec61a80a5614)
Signed-off-by: Michael Reed <email address hidden>

9c01a7e... by Zhen Lei <email address hidden>

scsi: mpt3sas: Fix error return value in _scsih_expander_add()

When an expander does not contain any 'phys', an appropriate error code -1
should be returned, as done elsewhere in this function. However, we
currently do not explicitly assign this error code to 'rc'. As a result, 0
was incorrectly returned.

Link: https://<email address hidden>
Fixes: f92363d12359 ("[SCSI] mpt3sas: add new driver supporting 12GB SAS")
Reported-by: Hulk Robot <email address hidden>
Signed-off-by: Zhen Lei <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit d6c2ce435ffe23ef7f395ae76ec747414589db46)
Signed-off-by: Michael Reed <email address hidden>

f1c9ce2... by Suganath Prabu

scsi: mpt3sas: Fix Coverity reported issue

Fix the structurally dead code (UNREACHABLE) type of error reported by
Coverity.

Link: https://lore<email address hidden>
Reported-by: Colin Ian King <email address hidden>
Signed-off-by: Suganath Prabu S <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit cf750be8e68e8c2755f0ee29784463a2da91e922)
Signed-off-by: Michael Reed <email address hidden>

fa44e14... by "Gustavo A. R. Silva" <email address hidden>

scsi: mpt3sas: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple
of warnings by explicitly adding break statements instead of just letting
the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Link: https://lore.kernel.org/r/20210528200828.GA39349@embeddedor
Reviewed-by: Kees Cook <email address hidden>
Signed-off-by: Gustavo A. R. Silva <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 84a84cc6aff4243c9f28c879b94d0dd55a310b54)
Signed-off-by: Michael Reed <email address hidden>

7d92e89... by Hannes Reinecke <email address hidden>

scsi: core: Introduce scsi_build_sense()

Introduce scsi_build_sense() as a wrapper around scsi_build_sense_buffer()
to format the buffer and set the correct SCSI status.

Link: https://<email address hidden>
Reviewed-by: Bart Van Assche <email address hidden>
Reviewed-by: Christoph Hellwig <email address hidden>
Signed-off-by: Hannes Reinecke <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit f2b1e9c6f867ec8f929e96ba4e4010e267587448)
Signed-off-by: Michael Reed <email address hidden>

b2a673f... by Suganath Prabu

scsi: mpt3sas: Handle firmware faults during second half of IOC init

If a firmware fault occurs while scanning the devices during IOC
initialization then the driver issues the hard reset operation to recover
the IOC. However, the driver is not issuing a Port enable request
messageĀ as part of hard reset operation during IOC initialization. Due to
this, the driver will not receive get any device discovery-related events
and hence devices will not be accessible.

Teach the driver to gracefully handle firmware faults while scanning for
target devices during IOC initialization. Make the driver issue a port
enable request message as part of hard reset operation. This permits
receiving device discovery-related events from the firmware after the hard
reset operation completes.

Link: https://lore<email address hidden>
Signed-off-by: Suganath Prabu S <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit a0815c45c89f544861eae55d85ccee6b1b1451e8)
Signed-off-by: Michael Reed <email address hidden>

00119a7... by Suganath Prabu

scsi: mpt3sas: Handle firmware faults during first half of IOC init

During first half of IOC initialization (i.e. before going for device
scanning), if any firmware fault occurs then driver is aborting the IOC
initialization operation.

Modify the driver to issue a diag reset operation to recover IOC from fault
state and reinitialize the IOC.

Link: https://lore<email address hidden>
Signed-off-by: Suganath Prabu S <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 19a622c39a9d497d3c06ffe9068ee4c7bbd2bdcc)
Signed-off-by: Michael Reed <email address hidden>

0f73039... by Suganath Prabu

scsi: mpt3sas: Fix deadlock while cancelling the running firmware event

Do not cancel current running firmware event work if the event type is
different from MPT3SAS_REMOVE_UNRESPONDING_DEVICES. Otherwise a deadlock
can be observed while cancelling the current firmware event work if a hard
reset operation is called as part of processing the current event.

Link: https://lore<email address hidden>
Signed-off-by: Suganath Prabu S <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit e2fac6c44ae06e58ac02181b048af31195883c31)
Signed-off-by: Michael Reed <email address hidden>