Re: [PATCH] scsi: avoid to fetch scsi host template instance in IO path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-02-28 01:33, Ming Lei wrote:
> scsi host template struct is quite big, and the following three
> fields are needed in SCSI IO path:
> 
> - queuecommand
> - commit_rqs
> - cmd_size
> 
> Cache them into scsi host intance, so that we can avoid to fetch
> big scsi host template instance in IO path.
> 
> 40% IOPS boost can be observed in my scsi_debug performance test after
> applying this change.
> 
> Cc: Sumanesh Samanta <sumanesh.samanta@xxxxxxxxxxxx>
> Cc: Ewan D . Milne <emilne@xxxxxxxxxx>
> Cc: Hannes Reinecke <hare@xxxxxxx>
> Cc: Bart Van Assche <bart.vanassche@xxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxx>

Please use my current email address instead of the above old and no
longer valid email address. See also the .mailmap file. I think I have
asked this before.

> @@ -1148,7 +1148,7 @@ void scsi_init_command(struct scsi_device *dev, struct scsi_cmnd *cmd)
>  	in_flight = test_bit(SCMD_STATE_INFLIGHT, &cmd->state);
>  	/* zero out the cmd, except for the embedded scsi_request */
>  	memset((char *)cmd + sizeof(cmd->req), 0,
> -		sizeof(*cmd) - sizeof(cmd->req) + dev->host->hostt->cmd_size);
> +		sizeof(*cmd) - sizeof(cmd->req) + dev->host->cmd_size);
>  
>  	cmd->device = dev;
>  	cmd->sense_buffer = buf;

This patch does not apply on Martin's 5.7/scsi-queue branch. Please rebase.

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux