[Top][All Lists]

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

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

From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 2/2] block: align bounce buffers to page
Date: Mon, 16 Feb 2015 11:59:42 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Am 06.02.2015 um 18:37 hat Denis V. Lunev geschrieben:
> The following sequence
>     int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644);
>     for (i = 0; i < 100000; i++)
>             write(fd, buf, 4096);
> performs 5% better if buf is aligned to 4096 bytes.
> The difference is quite reliable.
> On the other hand we do not want at the moment to enforce bounce
> buffering if guest request is aligned to 512 bytes.
> The patch introduces new concept: minimal memory alignment for bounce
> buffers. Original so called "optimal" value is actually minimal required
> value for aligment. Optimal should be set to page size by default.
> There is no driver which should change this default at the moment.
> Signed-off-by: Denis V. Lunev <address@hidden>
> CC: Paolo Bonzini <address@hidden>
> CC: Kevin Wolf <address@hidden>

I don't think the subject lines describes the patch correctly. IIUC,
patch 1 introduces a hard enforcement of page size alignment, and this
patch only loosens it again.

Perhaps the order of patches should be changed so that min_mem_alignment
is introduced first (without changes in the behaviour), and only then
opt_mem_alignment is increased.


reply via email to

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