linux-stable/include/scsi
Christoph Hellwig d285203cf6 scsi: add support for a blk-mq based I/O path.
This patch adds support for an alternate I/O path in the scsi midlayer
which uses the blk-mq infrastructure instead of the legacy request code.

Use of blk-mq is fully transparent to drivers, although for now a host
template field is provided to opt out of blk-mq usage in case any unforseen
incompatibilities arise.

In general replacing the legacy request code with blk-mq is a simple and
mostly mechanical transformation.  The biggest exception is the new code
that deals with the fact the I/O submissions in blk-mq must happen from
process context, which slightly complicates the I/O completion handler.
The second biggest differences is that blk-mq is build around the concept
of preallocated requests that also include driver specific data, which
in SCSI context means the scsi_cmnd structure.  This completely avoids
dynamic memory allocations for the fast path through I/O submission.

Due the preallocated requests the MQ code path exclusively uses the
host-wide shared tag allocator instead of a per-LUN one.  This only
affects drivers actually using the block layer provided tag allocator
instead of their own.  Unlike the old path blk-mq always provides a tag,
although drivers don't have to use it.

For now the blk-mq path is disable by defauly and must be enabled using
the "use_blk_mq" module parameter.  Once the remaining work in the block
layer to make blk-mq more suitable for slow devices is complete I hope
to make it the default and eventually even remove the old code path.

Based on the earlier scsi-mq prototype by Nicholas Bellinger.

Thanks to Bart Van Assche and Robert Elliot for testing, benchmarking and
various sugestions and code contributions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Webb Scales <webbnh@hp.com>
Acked-by: Jens Axboe <axboe@kernel.dk>
Tested-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Robert Elliott <elliott@hp.com>
2014-07-25 17:16:28 -04:00
..
fc libfc: Source code comment spelling fixes 2013-09-04 12:47:49 -07:00
fc_encode.h [SCSI] libfc: Add support for FDMI 2012-02-19 08:08:58 -06:00
fc_frame.h [SCSI] fcoe: remove unused ptype field in fcoe_rcv_info 2011-07-28 12:08:55 +04:00
fcoe_sysfs.h libfcoe, fcoe, bnx2fc: Add new fcoe control interface 2012-12-14 10:38:54 -08:00
iscsi_if.h [SCSI] scsi_transport_iscsi: Export ISCSI_PARAM_LOCAL_IPADDR attr for iscsi_connection 2013-12-19 20:56:26 -08:00
iscsi_proto.h [SCSI] be2iscsi: Get Initiator Name for the iSCSI_Host 2012-04-25 09:29:35 +01:00
libfc.h libfc: Do not invoke the response handler after fc_exch_done() 2013-09-04 13:45:22 -07:00
libfcoe.h libfcoe: Make fcoe_sysfs optional / fix fnic NULL exception 2013-10-11 13:25:40 -07:00
libiscsi.h Main batch of InfiniBand/RDMA changes for 3.15: 2014-04-03 16:57:19 -07:00
libiscsi_tcp.h [SCSI] libiscsi: Reduce locking contention in fast path 2014-03-15 10:19:18 -07:00
libsas.h libata, libsas: kill pm_result and related cleanup 2014-03-18 16:08:38 -04:00
osd_attributes.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
osd_initiator.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
osd_ore.h ore: Fix wrong math in allocation of per device BIO 2014-01-23 10:55:03 +02:00
osd_protocol.h include/scsi/osd_protocol.h: remove unnecessary __constant 2014-06-02 10:36:27 +02:00
osd_sec.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
osd_sense.h [SCSI] libosd: osd_sense: OSD_CFO_PERMISSIONS 2009-12-04 12:01:44 -06:00
osd_types.h [SCSI] libosd: Support for scatter gather write/read commands 2010-10-26 10:42:34 -05:00
sas.h [SCSI] sas: unify the pointlessly separated enums sas_dev_type and sas_device_type 2013-05-10 07:47:52 -07:00
sas_ata.h [SCSI] sas: unify the pointlessly separated enums sas_dev_type and sas_device_type 2013-05-10 07:47:52 -07:00
scsi.h scsi: use 64-bit LUNs 2014-07-17 22:07:37 +02:00
scsi_bsg_iscsi.h [SCSI] iscsi class: add bsg support to iscsi class 2011-08-27 08:36:21 -06:00
scsi_cmnd.h scsi: remove various exports that were only used by scsi_tgt 2014-07-17 22:07:45 +02:00
scsi_dbg.h
scsi_device.h scsi: fix the {host,target,device}_blocked counter mess 2014-07-25 17:15:48 -04:00
scsi_devinfo.h scsi_scan: Restrict sequential scan to 256 LUNs 2014-07-17 22:07:35 +02:00
scsi_dh.h [SCSI] scsi_dh: add scsi_dh_attached_handler_name 2012-07-20 08:58:42 +01:00
scsi_driver.h scsi: mark scsi_setup_blk_pc_cmnd static 2014-07-17 22:16:29 +02:00
scsi_eh.h
scsi_host.h scsi: add support for a blk-mq based I/O path. 2014-07-25 17:16:28 -04:00
scsi_ioctl.h
scsi_tcq.h scsi: add support for a blk-mq based I/O path. 2014-07-25 17:16:28 -04:00
scsi_transport.h scsi: use 64-bit LUNs 2014-07-17 22:07:37 +02:00
scsi_transport_fc.h [SCSI] scsi_transport_fc: Add 32Gbps speed definition. 2014-03-15 10:17:50 -07:00
scsi_transport_iscsi.h SCSI/libiscsi: Add check_protection callback for transports 2014-03-17 22:33:58 -07:00
scsi_transport_sas.h [SCSI] sas: unify the pointlessly separated enums sas_dev_type and sas_device_type 2013-05-10 07:47:52 -07:00
scsi_transport_spi.h [SCSI] aic79xx: make driver respect nvram for IU and QAS settings 2009-06-15 10:09:35 -05:00
scsi_transport_srp.h scsi_transport_srp: Fix two kernel-doc warnings 2014-03-24 10:05:30 -07:00
scsicam.h
sg.h sg: add SG_FLAG_Q_AT_TAIL flag 2014-07-17 22:07:34 +02:00
srp.h IB/srp: Implement SRP_CRED_REQ and SRP_AER_REQ 2010-10-22 22:19:10 -07:00