On 26/10/2018 10:26, Christoph Hellwig wrote: > On Fri, Oct 26, 2018 at 01:28:54AM +0200, Paolo Bonzini wrote: >> On 15/10/2018 11:27, Christoph Hellwig wrote: >>> There is some issues in this spec. For one using the multiple ranges >>> also for write zeroes is rather inefficient. Write zeroes really should >>> use the same format as read and write. >> >> What makes it inefficient? > > We require a memory allocation for each write zeroes instead of encoding > the lba/len in the command. Oh, I see. That's not a spec issue, the lba/length descriptor can be included in the same buffer as the rest of the command; using kmalloc_array even for a single-bio REQ_OP_WRITE_ZEROES is a choice made by this patch, I suppose for simplicity. It is possible to special case single-bio unmap and write zeroes so that they don't call virtblk_setup_discard_write_zeroes and avoid RQF_SPECIAL_PAYLOAD. Thanks, Paolo _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization