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

2017-10-25 Thread Douglas Gilbert
On 2017-10-25 03:28 AM, Hannes Reinecke wrote: On 10/25/2017 05:52 AM, Douglas Gilbert wrote: The sd_setup_read_write_cmnd() function is on the "fast path" for block system access to SCSI devices (logical units). Rewrite this function to improve speed and readability: - use put_unaligned_be fa

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

2017-10-25 Thread Hannes Reinecke
On 10/25/2017 05:52 AM, Douglas Gilbert wrote: > The sd_setup_read_write_cmnd() function is on the "fast path" for > block system access to SCSI devices (logical units). Rewrite this > function to improve speed and readability: > - use put_unaligned_be family of functions to save lots of shifts >

[PATCH v2.1] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-24 Thread Douglas Gilbert
The sd_setup_read_write_cmnd() function is on the "fast path" for block system access to SCSI devices (logical units). Rewrite this function to improve speed and readability: - use put_unaligned_be family of functions to save lots of shifts - improve the scaling code when sector_size > 512 bytes