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 <d...@openvz.org> > CC: Paolo Bonzini <pbonz...@redhat.com> > CC: Kevin Wolf <kw...@redhat.com>
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