Hi Johannes, > -----Original Message----- > From: Johannes Thumshirn [mailto:jthumshirn@xxxxxxx] > Sent: Thursday, January 26, 2017 1:06 AM > To: Raghava Aditya Renukunta > <RaghavaAditya.Renukunta@xxxxxxxxxxxxx> > Cc: jejb@xxxxxxxxxxxxxxxxxx; martin.petersen@xxxxxxxxxx; linux- > scsi@xxxxxxxxxxxxxxx; Dave Carroll <david.carroll@xxxxxxxxxxxxx>; Gana > Sridaran <gana.sridaran@xxxxxxxxxxxxx>; Scott Benesh > <scott.benesh@xxxxxxxxxxxxx> > 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 > jthumshirn@xxxxxxx +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 majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html