Hi Johannes,

> -----Original Message-----
> From: Johannes Thumshirn [mailto:jthumsh...@suse.de]
> Sent: Thursday, January 26, 2017 1:06 AM
> To: Raghava Aditya Renukunta
> <raghavaaditya.renuku...@microsemi.com>
> Cc: j...@linux.vnet.ibm.com; martin.peter...@oracle.com; linux-
> s...@vger.kernel.org; Dave Carroll <david.carr...@microsemi.com>; Gana
> Sridaran <gana.srida...@microsemi.com>; Scott Benesh
> <scott.ben...@microsemi.com>
> Subject: Re: [PATCH V2 06/24] aacraid: Reworked scsi command submission
> path
> 
> EXTERNAL EMAIL
> 
> 
> On Wed, Jan 25, 2017 at 10:00:53AM -0800, Raghava Aditya Renukunta wrote:
> > 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.
> 
> Can you please explain why you did the changes as well?

The idea is that since most of commands that we care performance wise, are
read and writes, we wanted to process them first and then the others later.

Internally as I understood it , a switch case is either converted into a jump
Table or a bunch of if else conditions, so placing the often used read,  write 
cases at top was an effort in optimization.  

Regards,
Raghava Aditya
> --
> Johannes Thumshirn                                          Storage
> jthumsh...@suse.de                                +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: Felix Imendörffer, Jane Smithard, Graham Norton
> HRB 21284 (AG Nürnberg)
> Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to