diff options
author | 2015-12-22 12:03:33 +0100 | |
---|---|---|
committer | 2016-02-09 13:52:26 +0000 | |
commit | ad523bca56a7202d2498c550a41be5c986c4d33c (patch) | |
tree | b3b07fcce95eefd07483b22923de1c4ae62b10bb /io/channel-buffer.c | |
parent | Merge remote-tracking branch 'remotes/amit-migration/tags/migration-for-2.6-2' into staging (diff) | |
download | qemu-ad523bca56a7202d2498c550a41be5c986c4d33c.tar.xz qemu-ad523bca56a7202d2498c550a41be5c986c4d33c.zip |
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 'io/channel-buffer.c')
0 files changed, 0 insertions, 0 deletions