diff options
author | Denis V. Lunev <den@openvz.org> | 2015-05-12 17:30:55 +0300 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2015-05-22 09:37:33 +0100 |
commit | 4196d2f0308cb1ae13ed450424ab7dfe154acda9 (patch) | |
tree | 144b613251246975ae7dd0033cd53a509a837c56 /block/raw-posix.c | |
parent | eaf5fe2dd4ec001d645ff3b343f466457badaa64 (diff) | |
download | qemu-4196d2f0308cb1ae13ed450424ab7dfe154acda9.tar.gz qemu-4196d2f0308cb1ae13ed450424ab7dfe154acda9.tar.bz2 qemu-4196d2f0308cb1ae13ed450424ab7dfe154acda9.zip |
block: minimal bounce buffer alignment
The patch introduces new concept: minimal memory alignment for bounce
buffers. Original so called "optimal" value is actually minimal required
value for aligment. It should be used for validation that the IOVec
is properly aligned and bounce buffer is not required.
Though, from the performance point of view, it would be better if
bounce buffer or IOVec allocated by QEMU will be aligned stricter.
The patch does not change any alignment value yet.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1431441056-26198-2-git-send-email-den@openvz.org
CC: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/raw-posix.c')
-rw-r--r-- | block/raw-posix.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/raw-posix.c b/block/raw-posix.c index 24d85826c4..70839245fd 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -725,6 +725,7 @@ static void raw_refresh_limits(BlockDriverState *bs, Error **errp) BDRVRawState *s = bs->opaque; raw_probe_alignment(bs, s->fd, errp); + bs->bl.min_mem_alignment = s->buf_align; bs->bl.opt_mem_alignment = s->buf_align; } |