qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/1] block: align bounce buffers to page


From: Denis V. Lunev
Subject: Re: [Qemu-devel] [PATCH 1/1] block: align bounce buffers to page
Date: Mon, 2 Feb 2015 19:49:26 +0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 02/02/15 19:47, Paolo Bonzini wrote:

On 02/02/2015 17:44, Denis V. Lunev wrote:
+++ b/block/raw-posix.c
@@ -667,7 +667,8 @@ static void raw_refresh_limits(BlockDriverState *bs, Error 
**errp)
      BDRVRawState *s = bs->opaque;
raw_probe_alignment(bs, s->fd, errp);
-    bs->bl.opt_mem_alignment = s->buf_align;
+    bs->bl.min_mem_alignment = s->buf_align;
+    bs->bl.opt_mem_alignment = MAX(sysconf(_SC_PAGESIZE), s->buf_align);
This does not exist on Windows.  You have to use getpagesize(), for
which there is a wrapper in util/oslib-win32.c.

Paolo

      raw_probe_max_write_zeroes(bs);
cool suggestion, will do that. Thank you



reply via email to

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