Bug 714798 - [6.2 Feat] scsi lock pushdown backport
Summary: [6.2 Feat] scsi lock pushdown backport
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.1
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Red Hat Kernel Manager
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-20 19:29 UTC by Rob Evers
Modified: 2014-11-21 13:58 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-18 18:56:36 UTC
Target Upstream Version:


Attachments (Terms of Use)
lock-pushdown scsi mid-layer backport (4.36 KB, patch)
2011-06-20 19:34 UTC, Rob Evers
no flags Details | Diff
rhel6 backport of scsi-ml lockless queuecommand dispatch (2.18 KB, application/octet-stream)
2011-06-24 21:16 UTC, Rob Evers
no flags Details
scsi ml error handling lock pushdown (1.32 KB, application/octet-stream)
2011-07-14 14:49 UTC, Rob Evers
no flags Details

Description Rob Evers 2011-06-20 19:29:15 UTC
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:

Comment 1 Rob Evers 2011-06-20 19:34:16 UTC
Created attachment 505681 [details]
lock-pushdown scsi mid-layer backport

Comment 4 Rob Evers 2011-06-21 18:21:54 UTC
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.

Comment 5 Rob Evers 2011-06-22 15:51:20 UTC
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);

Comment 6 Rob Evers 2011-06-24 11:42:03 UTC
(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.

Comment 7 Rob Evers 2011-06-24 21:16:46 UTC
Created attachment 509845 [details]
rhel6 backport of scsi-ml lockless queuecommand dispatch

Comment 8 Rob Evers 2011-06-24 21:17:49 UTC
(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

Comment 9 Rob Evers 2011-07-14 14:49:23 UTC
Created attachment 513203 [details]
scsi ml error handling lock pushdown

This case of queuecommand dispatch was missed.  Adding equivalent unlocking.

Comment 10 RHEL Program Management 2011-10-07 15:38:16 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.