aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2014-02-20 17:21:01 -0500
committerJames Bottomley <JBottomley@Parallels.com>2014-03-27 11:26:33 -0400
commit89d9a567952baec13e26ada3e438f1b642d66b6e (patch)
treef6217370ee634dc3fa08228a0aa1073265aa13b7 /include/scsi
parent7c283341225d0ebeb7480a9e6560f599dcd0f417 (diff)
[SCSI] add support for per-host cmd pools
This allows drivers to specify the size of their per-command private data in the host template and then get extra memory allocated for each command instead of needing another allocation in ->queuecommand. With the current SCSI code that already does multiple allocations for each command this probably doesn't make a big performance impact, but it allows to clean up the drivers, and prepare them for using the blk-mq infrastructure where the common allocation will make a difference. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_host.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 53075e5039e6..94844fc77b97 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -15,6 +15,7 @@ struct completion;
15struct module; 15struct module;
16struct scsi_cmnd; 16struct scsi_cmnd;
17struct scsi_device; 17struct scsi_device;
18struct scsi_host_cmd_pool;
18struct scsi_target; 19struct scsi_target;
19struct Scsi_Host; 20struct Scsi_Host;
20struct scsi_host_cmd_pool; 21struct scsi_host_cmd_pool;
@@ -524,6 +525,12 @@ struct scsi_host_template {
524 * scsi_netlink.h 525 * scsi_netlink.h
525 */ 526 */
526 u64 vendor_id; 527 u64 vendor_id;
528
529 /*
530 * Additional per-command data allocated for the driver.
531 */
532 unsigned int cmd_size;
533 struct scsi_host_cmd_pool *cmd_pool;
527}; 534};
528 535
529/* 536/*