qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH 07/40] virtio: slim down allocation


From: Paolo Bonzini
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 07/40] virtio: slim down allocation of VirtQueueElements
Date: Mon, 30 Nov 2015 09:36:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 30/11/2015 04:24, Fam Zheng wrote:
> > +    for (i = 0; i < out_num; i++) {
> > +        elem->out_addr[i] = addr[i];
> > +        elem->out_sg[i] = iov[i];
> > +    }
>
> Isn't memcpy more efficient here? Otherwise looks good.

Probably not, out_num/in_num is usually very small, in fact one of them
is often 0 or 1.

For example the memcpy in address_space_rw is awfully inefficient.  This
is roughly the same.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]