Hide Forgot
Description of problem: Backport of scsi midlayer lock pushdown. Backport required to maintain binary compatibility. This allows scsi subsystems to indicate to the scsi midlayer that the subsystem queuecommand should be called without the scsi host lock being held. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Created attachment 505681 [details] lock-pushdown scsi mid-layer backport
The scsi midlayer supports optional lockless dispatching of scsi driver queuecommand functions as of rhel6.2 - beta. This is a backport of the upstream scsi lock pushdown commit. The backport retains binary compatibility with rhel6.0 and rhel6.1. Retaining binary compatibility requires divergence from the equivalent upstream scsi lock pushdown mechanism. A previously un-used flag in the scsi_host_template structure is used by scsi drivers to indicate to the scsi midlayer that driver queuecommand will be dispatched without the scsi host bus lock held. This bit is copied into another previously un-used bit in the Scsi_Host structure. The default behavior is that the Scsi_Host lock will be held during driver queuecommand dispatch. Setting the scsi_host_template lockless bit prior to scsi_host_alloc will cause the driver queuecommand function to be dispatched without the Scsi_Host lock being held. In this case, the responsibility for any lock protection required is "pushed down" into the driver queuecommand code path.
For drivers to request that the scsi midlayer call the driver's queuecommand with the Scsi_Host lock not held, the driver must set the scsi_host_template's lockless bit before the scsi_host_template is passed to scsi_host_alloc. ie: + sht->lockless = 1; scsi_host_alloc(sht, size);
(In reply to comment #5) > For drivers to request that the scsi midlayer call the driver's queuecommand > with the Scsi_Host lock not held, the driver must set the scsi_host_template's > lockless bit before the scsi_host_template is passed to scsi_host_alloc. > > ie: > > + sht->lockless = 1; > scsi_host_alloc(sht, size); Apply https://bugzilla.redhat.com/attachment.cgi?id=505681 before enabling lockless queuecommand callback. Also ensure locking mechanisms are in place to replace the host bus lock mechanism that this removes. This is driver specific.
Created attachment 509845 [details] rhel6 backport of scsi-ml lockless queuecommand dispatch
(In reply to comment #1) > Created attachment 505681 [details] > lock-pushdown scsi mid-layer backport See updated attachment: https://bugzilla.redhat.com/attachment.cgi?id=509845
Created attachment 513203 [details] scsi ml error handling lock pushdown This case of queuecommand dispatch was missed. Adding equivalent unlocking.
Since RHEL 6.2 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.