qemu-devel
[Top][All Lists]
Advanced

[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: Denis V. Lunev
Subject: Re: [Qemu-devel] [PATCH 2/2] block: align bounce buffers to page
Date: Mon, 16 Feb 2015 14:14:38 +0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 16/02/15 13:59, Kevin Wolf wrote:
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.

Kevin
ok :)



reply via email to

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