Fam Zheng 61e68b3fbd 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 the beginning of the structure, before sense buffer, to
skip the memset.

Also change g_malloc0 to g_slice_alloc.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-09-23 15:40:51 +02:00
..
2014-08-15 19:12:48 +04:00
2014-09-18 20:02:01 +01:00
2013-12-24 18:02:18 +01:00
2014-09-02 22:38:16 +04:00
2014-09-22 12:09:43 +04:00
2014-09-11 12:20:32 +02:00
2014-09-02 22:38:16 +04:00
2014-09-02 22:38:16 +04:00
2014-08-14 13:22:00 +02:00
2014-09-22 11:39:49 +01:00
2014-06-30 21:13:30 +02:00
2014-09-23 15:40:51 +02:00
2014-08-25 00:16:06 +02:00
2014-08-18 12:06:21 +02:00