Re: [Qemu-devel] [PATCH v2 1/2] scsi: Optimize scsi_req_alloc
Il 15/09/2014 07:23, Fam Zheng ha scritto: > +uint8_t sense[SCSI_SENSE_BUF_SIZE]; > +uint32_t sense_len; > +bool enqueued; > +bool io_canceled; > +bool retry; > +bool dma_started; > SCSICommand
[Qemu-devel] [PATCH v2 1/2] scsi: Optimize scsi_req_alloc
Zeroing sense buffer for each scsi request is not efficient, we can just leave it uninitialized because sense_len is set to 0. Move the implicitly zeroed fields to the end of the structure and use a partial memset. The explicitly initialized fields (by scsi_req_alloc or scsi_req_new) are moved to