Re: [PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-24 Thread Douglas Gilbert
On 2017-10-17 06:41 PM, Bart Van Assche wrote: On Tue, 2017-10-17 at 18:17 -0400, Douglas Gilbert wrote: On 2017-10-17 05:03 PM, Bart Van Assche wrote: @@ -1025,7 +1025,6 @@ static int sd_setup_read_write_cmnd(struct scsi_cmnd *SCpnt) struct gendisk *disk = rq->rq_disk; struct

Re: [PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-19 Thread Douglas Gilbert
On 2017-10-17 06:41 PM, Bart Van Assche wrote: On Tue, 2017-10-17 at 18:17 -0400, Douglas Gilbert wrote: On 2017-10-17 05:03 PM, Bart Van Assche wrote: @@ -1025,7 +1025,6 @@ static int sd_setup_read_write_cmnd(struct scsi_cmnd *SCpnt) struct gendisk *disk = rq->rq_disk; struct

Re: [PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-18 Thread Christoph Hellwig
On Tue, Oct 17, 2017 at 11:10:42PM -0400, Martin K. Petersen wrote: > Please take a look at this. It missed 4.15 because I've been fighting a > hardware bug the last several weeks. However, I'd still like to get it > in shape for 4.16: > >

Re: [PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-17 Thread Martin K. Petersen
Bart, > Only compute 'threshold' if .last_sector_bug has been set. Reduce > the number of branches that has to be taken to check the starting > LBA and transfer length alignment. Optimize the encoding of the > READ(10), WRITE(10), READ(16), WRITE(16), READ(32) and WRITE(32) > CDB encoding.

Re: [PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-17 Thread Bart Van Assche
On Tue, 2017-10-17 at 18:17 -0400, Douglas Gilbert wrote: > On 2017-10-17 05:03 PM, Bart Van Assche wrote: > > @@ -1025,7 +1025,6 @@ static int sd_setup_read_write_cmnd(struct scsi_cmnd > > *SCpnt) > > struct gendisk *disk = rq->rq_disk; > > struct scsi_disk *sdkp = scsi_disk(disk); > >

Re: [PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-17 Thread Douglas Gilbert
On 2017-10-17 05:03 PM, Bart Van Assche wrote: Only compute 'threshold' if .last_sector_bug has been set. Reduce the number of branches that has to be taken to check the starting LBA and transfer length alignment. Optimize the encoding of the READ(10), WRITE(10), READ(16), WRITE(16), READ(32)