diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-12-22 12:03:33 +0100 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:34:37 -0600 |
commit | 1cfd76af9b5d28d9ce9d33bc372f6e0a858e55cf (patch) | |
tree | abe532685f1e94ca7da3b32eec7e20c2390c11b3 /util/base64.c | |
parent | 13d76bf819f959a3e9d0f140b2b738893369feca (diff) | |
download | hqemu-1cfd76af9b5d28d9ce9d33bc372f6e0a858e55cf.zip hqemu-1cfd76af9b5d28d9ce9d33bc372f6e0a858e55cf.tar.gz |
iov: avoid memcpy for "simple" iov_from_buf/iov_to_buf
memcpy can take a large amount of time for small reads and writes.
For virtio it is a common case that the first iovec can satisfy the
whole read or write. In that case, and if bytes is a constant to
avoid excessive growth of code, inline the first iteration
into the caller.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1450782213-14227-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'util/base64.c')
0 files changed, 0 insertions, 0 deletions