[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>
This commit is contained in:

کامیت شده توسط
James Bottomley

والد
7c28334122
کامیت
89d9a56795
@@ -15,6 +15,7 @@ struct completion;
|
||||
struct module;
|
||||
struct scsi_cmnd;
|
||||
struct scsi_device;
|
||||
struct scsi_host_cmd_pool;
|
||||
struct scsi_target;
|
||||
struct Scsi_Host;
|
||||
struct scsi_host_cmd_pool;
|
||||
@@ -524,6 +525,12 @@ struct scsi_host_template {
|
||||
* scsi_netlink.h
|
||||
*/
|
||||
u64 vendor_id;
|
||||
|
||||
/*
|
||||
* Additional per-command data allocated for the driver.
|
||||
*/
|
||||
unsigned int cmd_size;
|
||||
struct scsi_host_cmd_pool *cmd_pool;
|
||||
};
|
||||
|
||||
/*
|
||||
|
مرجع در شماره جدید
Block a user