~mreed8855/ubuntu/+source/linux/+git/hirsute:mpt3sas_update_38_100_hirsute_next3

Last commit made on 2021-08-28
Get this branch:
git clone -b mpt3sas_update_38_100_hirsute_next3 https://git.launchpad.net/~mreed8855/ubuntu/+source/linux/+git/hirsute
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_hirsute_next3
Repository:
lp:~mreed8855/ubuntu/+source/linux/+git/hirsute

Recent commits

9487ace... by Ming Lei <email address hidden>

scsi: sbitmap: Move allocation hint into sbitmap

Allocation hint should have belonged to sbitmap. Also, when sbitmap's depth
is high and there is no need to use mulitple wakeup queues, user can
benefit from percpu allocation hint too.

Move allocation hint into sbitmap, then SCSI device queue can benefit from
allocation hint when converting to plain sbitmap.

Convert vhost/scsi.c to use sbitmap allocation with percpu alloc hint. This
is more efficient than the previous approach.

BugLink: https://launchpad.net/bugs/1935034
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: Mike Christie <email address hidden>
Cc: <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 c548e62bcf6adc7066ff201e9ecc88e536dd8890)
Signed-off-by: Michael Reed <email address hidden>

786e0de... by Ming Lei <email address hidden>

scsi: sbitmap: Maintain allocation round_robin in sbitmap

Currently the allocation round_robin info is maintained by sbitmap_queue.

However, bit allocation really belongs to sbitmap. Move it there.

BugLink: https://launchpad.net/bugs/1935034
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>
Cc: <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 efe1f3a1d5833c0ddd61ee50dbef8908f65a0a5e)
Signed-off-by: Michael Reed <email address hidden>

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

scsi: sbitmap: Add helpers for updating allocation hint

Add helpers for updating allocation hint so that we can avoid duplicate
code.

Prepare for moving allocation hint into sbitmap.

BugLink: https://launchpad.net/bugs/1935034
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 bf2c4282a10a92810ba83e85677a5273d6ca0df5)
Signed-off-by: Michael Reed <email address hidden>

1cde9ae... by Kashyap Desai <email address hidden>

scsi: megaraid_sas: Replace sdev_busy with local counter

Use local tracking of per-sdev outstanding command since sdev_busy in SCSI
mid layer is improved for performance reason using sbitmap (earlier it was
atomic variable).

BugLink: https://launchpad.net/bugs/1935034
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>
Reviewed-by: Hannes Reinecke <email address hidden>
Signed-off-by: Kashyap Desai <email address hidden>
Signed-off-by: Ming Lei <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 6cb9b15238a389a8892a6ed08f5c68a0ac45d720)
Signed-off-by: Michael Reed <email address hidden>

4c772ae... by Ming Lei <email address hidden>

scsi: sbitmap: Export sbitmap_weight

SCSI's .device_busy will be converted to sbitmap and sbitmap_weight is
needed. Export the helper.

The only existing user of sbitmap_weight() uses it to find out how many
bits are set and not cleared. Align sbitmap_weight() meaning with this
usage model.

BugLink: https://launchpad.net/bugs/1935034
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 cbb9950b41dd9dfb7c2be3429ba09f83b8b1ff98)
Signed-off-by: Michael Reed <email address hidden>

45f1720... by Sreekanth Reddy

scsi: mpt3sas: Bump driver version to 38.100.00.00

Bump driver version to 38.100.00.00.

BugLink: https://launchpad.net/bugs/1935034
Link: https://<email address hidden>
Reviewed-by: Lee Duncan <email address hidden>
Signed-off-by: Sreekanth Reddy <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 44f88ef3c9f1edf4f8229508649965d85bc6f186)
Signed-off-by: Michael Reed <email address hidden>

3195ff8... 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]

BugLink: https://launchpad.net/bugs/1935034
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>

338810e... 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.

BugLink: https://launchpad.net/bugs/1935034
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>

a898ced... by Suganath Prabu

scsi: mpt3sas: Fix Coverity reported issue

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

BugLink: https://launchpad.net/bugs/1935034
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>

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

BugLink: https://launchpad.net/bugs/1935034
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>