public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] megaraid_sas: Convert to host_lock less w/ interrupts disabled internally
@ 2010-11-28  7:17 Nicholas A. Bellinger
  2010-11-28  7:17 ` [PATCH 1/3] megaraid_sas: Add smp_mb__after_atomic_*() for instance->fw_outstanding Nicholas A. Bellinger
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Nicholas A. Bellinger @ 2010-11-28  7:17 UTC (permalink / raw)
  To: linux-scsi, Hannes Reinecke, Bo Yang
  Cc: Christoph Hellwig, James Bottomley, Nicholas Bellinger

From: Nicholas Bellinger <nab@linux-iscsi.org>

Greetings Hannes, Bo and Co,

This series converts megaraid_sas to run in modern host_lock-less mode
for >= .37-rc3+ with interrupts disabled internally around megasas_instance->hba_lock.
This series is currently living in lio-core-2.6.git/lock_less-LLDs-for-38-v2,
and is intended for .38 mainline code.

The first patch adds a handful of missing barriers around instance->fw_outstanding
usage w/ atomic_add() and atomic_dec().

The second converts instance->issuepend_done to an atomic_t, along with
the necessary assignments in order to run w/ Scsi_Host->host_lock, and
without instance->hba_lock.

The third patch does the actual conversion, and adds a __megasas_get_cmd()
usased by megasas_queue_command() w/ instance->hba_lock, along with
being held for megasas_build_ldio() and megasas_build_dcdb() in order
to locate the proper frame for struct megasas_cmd.  This is really the
one major change in order to get host_lock-less to function with interrupts
disabled around hba_lock.

So far this has been tested with Hannes's QEMU 8708EM2 HBA emulation with
TCM_Loop backends using SG_IO from KVM host in a paired Host/Guest .37-rc3
environment.  This has not been tested on real silicon yet, but I believe
this series should be working there as well.

Comments are welcome, thanks!

Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>

Nicholas Bellinger (3):
  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/scsi/megaraid/megaraid_sas.c |   84 ++++++++++++++++++++++-----------
 drivers/scsi/megaraid/megaraid_sas.h |    2 +-
 2 files changed, 57 insertions(+), 29 deletions(-)

-- 
1.7.2.3


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

end of thread, other threads:[~2010-12-01  0:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-28  7:17 [PATCH 0/3] megaraid_sas: Convert to host_lock less w/ interrupts disabled internally Nicholas A. Bellinger
2010-11-28  7:17 ` [PATCH 1/3] megaraid_sas: Add smp_mb__after_atomic_*() for instance->fw_outstanding Nicholas A. Bellinger
2010-11-28  7:17 ` [PATCH 2/3] megaraid_sas: Convert instance->issuepend_done to atomic_t Nicholas A. Bellinger
2010-11-28  7:17 ` [PATCH 3/3] megaraid_sas: Convert SHT->queuecommand() to run host_lock-less Nicholas A. Bellinger
2010-11-29 16:41   ` Christoph Hellwig
2010-11-29 20:54     ` Nicholas A. Bellinger
2010-11-28  7:28 ` [PATCH 0/3] megaraid_sas: Convert to host_lock less w/ interrupts disabled internally Nicholas A. Bellinger
2010-11-29 15:56   ` Hannes Reinecke
2010-11-29 21:07     ` Nicholas A. Bellinger
2010-11-30  6:26 ` Yang, Bo
2010-11-30 21:21   ` Nicholas A. Bellinger
2010-11-30 22:05     ` Nicholas A. Bellinger
2010-11-30 22:30       ` Yang, Bo
2010-12-01  0:24         ` Nicholas A. Bellinger

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