Searched hist:c4e2fbca (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/scsi/aacraid/ |
H A D | aachba.c | c4e2fbca Thu Feb 02 17:53:20 CST 2017 Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> scsi: aacraid: Reworked scsi command submission path
Moved the READ and WRITE switch cases to the top. Added a default case to the switch case and replaced duplicate scsi result value with a macro.
The idea is that since most of scsi commands we care about performance wise are read or write, we need to process them first.
Internally the compiler (GCC) converts a switch case into either a jump table or a bunch of if else conditions, so placing the often used read, write cases at the top is an effort in optimization.
Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Dave Carroll <David.Carroll@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> c4e2fbca Thu Feb 02 17:53:20 CST 2017 Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> scsi: aacraid: Reworked scsi command submission path Moved the READ and WRITE switch cases to the top. Added a default case to the switch case and replaced duplicate scsi result value with a macro. The idea is that since most of scsi commands we care about performance wise are read or write, we need to process them first. Internally the compiler (GCC) converts a switch case into either a jump table or a bunch of if else conditions, so placing the often used read, write cases at the top is an effort in optimization. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Dave Carroll <David.Carroll@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|