Skip to content

LLD host_lock-less conversion status for .38

Nicholas A. Bellinger linux-scsi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 27 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12libiscsi: Convert to host_lock less w/ interrupts disabled internallydrivers/scsi/libiscsi.c+2 -812 replies
2/12scsi: Add IRQ_DISABLE_SCSI_QCMD wrapperinclude/scsi/scsi_host.h+14 -01 reply
3/12libsas: Convert to host_lock less w/ interrupts disabled externallydrivers/scsi/libsas/sas_scsi_host.c+2 -102 replies
4/12message: Convert to host_lock less w/ interrupts disabled externallydrivers/message/fusion/mptfc.c drivers/message/fusion/mptsas.c drivers/message/fusion/mptscsih.c +2 more+13 -110 replies
5/12fnic: Convert to host_lock less w/ interrupts disabled externallydrivers/scsi/fnic/fnic_scsi.c+3 -110 replies
6/12lpfc: Convert to host_lock less w/ interrupts disabled externallydrivers/scsi/lpfc/lpfc_scsi.c+4 -50 replies
7/12qla2xxx: Convert to host_lock less w/ interrupts disabled externallydrivers/scsi/qla2xxx/qla_os.c+3 -89 replies
8/12qla4xxx: Convert to host_lock less w/ interrupts disabled externallydrivers/scsi/qla4xxx/ql4_os.c+3 -70 replies
9/12scsi_debug: Convert to host_lock lessdrivers/scsi/scsi_debug.c+7 -90 replies
10/12megaraid_sas: Add smp_mb__after_atomic_*() for instance->fw_outstandingdrivers/scsi/megaraid/megaraid_sas.c+4 -00 replies
11/12megaraid_sas: Convert instance->issuepend_done to atomic_tdrivers/scsi/megaraid/megaraid_sas.c drivers/scsi/megaraid/megaraid_sas.h+7 -80 replies
12/12megaraid_sas: Convert SHT->queuecommand() to run host_lock-lessdrivers/scsi/megaraid/megaraid_sas.c+45 -230 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/12] LLD host_lock-less conversion status for .38

From: Nicholas Bellinger <[email protected]>

Greetings James and Co,

Attached are the current set of LLD host_lock-less conversions in the queue for .38, that have now been pushed into lio-core-2.6.git/lock_less-LLDs-for-38-v3

New in this v3 series are the megaraid_sas LLD changes necessary to run in host_lock-less mode, which have been tested thus far in legacy x86 interrupt pin mode using 8708EM2 QEMU HBA emulation into KVM guest using TCM_Loop virtual SCSI LUNs.

This series also drops the drivers/scsi patches that have been resolved with the following (Thanks!)

commit 459dbf72e4d2b4aa13620e6b70d54f098547bf13

Author: James Bottomley <[email protected]>
Date:   Wed Nov 17 10:10:57 2010 -0600

[SCSI] Eliminate error handler overload of the SCSI serial number

At this point the remaining code TODO items for the LLD conversion patches include

*) libiscsi: NULL sc->scsi_done() callback in exception path in iscsi_queuecommand(). The last status on this from Mike Christie was:

"This will NULL pointer. See a couple lines above where we NULL it. iscsi_free_task checks if the scsi_done pointer is set and if it is it will call scsi_done.

It is a hack to prevent the normal completion path from calling scsi_done. For the case where we return SCSI_MLQUEUE_TARGET_BUSY (the prepd_reject case) we need something to prevent scsi_done from getting called.

For the return 0/prepd_fault case we can just call sc->scsi_done, but we have to move some code around."

mnc, have you been able to take another look at this..?

*) mpt2sas: Locking considerations for firmware specific data structures

A patch to mptsas was included originally to convert to host_lock less w/ interrupts disabled externally here:

http://git.kernel.org/?p=linux/kernel/git/nab/lio-core-2.6.git;a=commitdiff;h=87ba9071b46f37f1adab1732d41b87bf195d191f

but due to concerns from jgarzik this had been dropped from the lock_less-LLDs-for-38-v2 during the last round. The feedback from Kashyap @ LSI is that mpt2sas technically should be able to run in host_lock-less, but there needs to be some explict clarification in the code for the conversion to happen. More details are here:

http://marc.info/?l=linux-scsi&m=129022827729386&w=2

Kashyap, can you take another look at this and make sure this is acceptable..?

*) megaraid_sas: Running in host_lock-less mode with MSI-X interrupts

This has not been tested yet, but I would like to get some review from the LSI megaraid_sas folks now that their patches to enable MSI-X interrupts has been sent to linux-scsi.

AdamR, any thoughts or comments to add here..?

----------------------------------------------------------------------------------

So at this point the next steps will be to shaking out breakage in corner cases for struct scsi_device hotplug removal, more testing+validation, and more LLD code review.

For the CC'ed LLD maintainers, please have another look at the changes to enable host_lock-less operation within your code and send the necessary ACKs to linux-scsi at your earliest convience. Many thanks to everyone who has contributed!

If anyone has any other patches, comments or concerns please let me know and they will be queued up for the next v4 for-38 round.

Best Regards,

Nicholas Bellinger (12):
libiscsi: Convert to host_lock less w/ interrupts disabled internally
scsi: Add IRQ_DISABLE_SCSI_QCMD wrapper
libsas: Convert to host_lock less w/ interrupts disabled externally
message: Convert to host_lock less w/ interrupts disabled externally
fnic: Convert to host_lock less w/ interrupts disabled externally
lpfc: Convert to host_lock less w/ interrupts disabled externally
qla2xxx: Convert to host_lock less w/ interrupts disabled externally
qla4xxx: Convert to host_lock less w/ interrupts disabled externally
scsi_debug: Convert to host_lock less
megaraid_sas: Add smp_mb__after_atomic_*() for

    instance->fw_outstanding

megaraid_sas: Convert instance->issuepend_done to atomic_t
megaraid_sas: Convert SHT->queuecommand() to run host_lock-less

 drivers/message/fusion/mptfc.c       |    2 +-
 drivers/message/fusion/mptsas.c      |    6 +-
 drivers/message/fusion/mptscsih.c    |    8 ++-
 drivers/message/fusion/mptscsih.h    |    2 +-
 drivers/message/fusion/mptspi.c      |    6 +-
 drivers/scsi/fnic/fnic_scsi.c        |   14 +----
 drivers/scsi/libiscsi.c              |   10 +---
 drivers/scsi/libsas/sas_scsi_host.c  |   12 +----
 drivers/scsi/lpfc/lpfc_scsi.c        |    9 ++--
 drivers/scsi/megaraid/megaraid_sas.c |   85 ++++++++++++++++++++++------------
 drivers/scsi/megaraid/megaraid_sas.h |    2 +-
 drivers/scsi/qla2xxx/qla_os.c        |   11 +---
 drivers/scsi/qla4xxx/ql4_os.c        |   10 +---
 drivers/scsi/scsi_debug.c            |   16 +++----
 include/scsi/scsi_host.h             |   14 ++++++
 15 files changed, 107 insertions(+), 100 deletions(-)
Signature · 1 line
1.7.3.4