Received: from eggs.gnu.org ([2001:4830:134:3::10]:40909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afs2l-0000W3-RY for qemu-devel@nongnu.org; Tue, 15 Mar 2016 12:42:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afs2h-0005iz-RN for qemu-devel@nongnu.org; Tue, 15 Mar 2016 12:42:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afs2h-0005il-Kq for qemu-devel@nongnu.org; Tue, 15 Mar 2016 12:41:59 -0400 From: Markus Armbruster References: <1457378754-21649-1-git-send-email-armbru@redhat.com> <1457378754-21649-3-git-send-email-armbru@redhat.com> <56DEDEF9.6030506@redhat.com> Date: Tue, 15 Mar 2016 17:41:56 +0100 In-Reply-To: <56DEDEF9.6030506@redhat.com> (Paolo Bonzini's message of "Tue, 8 Mar 2016 15:17:29 +0100") Message-ID: <87io0nsnfv.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 02/42] exec: Fix memory allocation when memory path isn't on hugetlbfs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: mlureau@redhat.com, cam@cs.ualberta.ca, claudio.fontana@huawei.com, qemu-devel@nongnu.org, david.marchand@6wind.com Paolo Bonzini writes: > On 07/03/2016 20:25, Markus Armbruster wrote: >> gethugepagesize() works reliably only when its argument is on >> hugetlbfs. When it's not, it returns the filesystem's "optimal >> transfer block size", which may or may not be the actual page size >> you'll get when you mmap(). >> >> If the value is too small or not a power of two, we fail >> qemu_ram_mmap()'s assertions. These were added in commit 794e8f3 >> (v2.5.0). The bug's impact before that is currently unknown. Seems >> fairly unlikely at least when the normal page size is 4KiB. >> >> Else, if the value is too large, we align more strictly than >> necessary. >> >> gethugepagesize() goes back to commit c902760 (v0.13). That commit >> clearly intended gethugepagesize() to be used on hugetlbfs only. Not >> only was it named accordingly, it also printed a warning when used on >> anything else. However, the commit neglected to spell out the >> restriction in user documentation of -mem-path. >> >> Commit bfc2a1a (v2.5.0) dropped the warning as bogus "because QEMU >> functions perfectly well with the path on a regular tmpfs filesystem". >> It sure does when you're sufficiently lucky. In my testing, I was >> lucky, too. >> >> Fix by switching to qemu_fd_getpagesize(). Rename the variable >> holding its result from hpagesize to page_size. >> >> Cc: Paolo Bonzini >> Signed-off-by: Markus Armbruster [...] > > Queued, thanks. Not in master, yet. What repo+branch should I use as base for v3?