public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* mpt2sas,mpt3sas watchdog device removal
@ 2013-05-15 17:24 Joe Lawrence
  2013-05-15 17:26 ` [PATCH] mpt2sas,mpt3sas: make watchdog instantiated device removal safe Joe Lawrence
  2013-05-15 17:29 ` mpt2sas,mpt3sas watchdog device removal Joe Lawrence
  0 siblings, 2 replies; 12+ messages in thread
From: Joe Lawrence @ 2013-05-15 17:24 UTC (permalink / raw)
  To: linux-scsi
  Cc: James E.J. Bottomley, Sreekanth Reddy, Desai, Kashyap,
	Nagalakshmi Nandigama, Bjorn Helgaas

This is a followup to the earlier discussion of MPT watchdog device
removal calling directly into PCI core API:

[1] http://thread.gmane.org/gmane.linux.scsi/80629

I've tested two safer, alternative methods of removing MPT hosts from
the SCSI topology. Both involve wrapping the existing MPT .remove
routine, ensuring mutual exclusion between regularly scheduled PCI
device removal and the drivers' periodic watchdog thread. Both changes
tested well against surprise PCI removal of LSI SAS 9211-8i HBAs while
driving direct IO out to attached disks.

The first version is straightforward, essentially just adding a common
mutex and checking that the driver still cares about a given PCI device
before removing.

The second version is an attempt to detach only from the SCSI topology as
soon as possible. Later PCI removal cleans up the rest of the resources.

Neither patch maps cleanly to the MPT fusion driver as its watchdog
thread resides in the mptbase module. The code currently uses PCI core
API pci_remove_bus_device to route around the driver's module
dependencies to call from mptbase to mptsas:

Module                  Size  Used by
mptsas                 62366  8                      << PCI .remove
mptscsih               38803  1 mptsas
mptbase                99878  2 mptsas,mptscsih      << watchdog

The fusion driver has devised other means of calling from mptbase to
mptscsih, for example, via the schedule_dead_ioc_flush_running_cmds
function pointer. The two changes I explored were made with a relatively
light hand, so I didn't know how best to proceed with a MPT fusion
patch.

Comments on either removal patch strategy welcome. It would also be
great if we had documentation guiding the SCSI LLDs in how to safely and
completely remove attached hosts in hotplug and defective HW scenarios.

Regards,

-- Joe

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

end of thread, other threads:[~2013-10-21 14:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-15 17:24 mpt2sas,mpt3sas watchdog device removal Joe Lawrence
2013-05-15 17:26 ` [PATCH] mpt2sas,mpt3sas: make watchdog instantiated device removal safe Joe Lawrence
2013-05-17 15:29   ` Bjorn Helgaas
2013-05-15 17:29 ` mpt2sas,mpt3sas watchdog device removal Joe Lawrence
2013-05-17 15:29   ` Bjorn Helgaas
2013-05-17 21:42     ` Joe Lawrence
2013-10-10 21:59       ` Bjorn Helgaas
2013-10-21 14:24         ` Joe Lawrence
2013-07-16 12:00   ` Reddy, Sreekanth
2013-07-16 12:03     ` James Bottomley
2013-07-16 15:21       ` Joe Lawrence
2013-07-17 12:03         ` Reddy, Sreekanth

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