From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3iZI-00029f-4M for qemu-devel@nongnu.org; Tue, 01 Dec 2015 05:53:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3iZE-00056n-S7 for qemu-devel@nongnu.org; Tue, 01 Dec 2015 05:53:56 -0500 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:39618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3iZE-00056M-7V for qemu-devel@nongnu.org; Tue, 01 Dec 2015 05:53:52 -0500 Received: from localhost by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Dec 2015 16:23:49 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id E2D6B3940060 for ; Tue, 1 Dec 2015 16:23:46 +0530 (IST) Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay04.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tB1ArIkO8061366 for ; Tue, 1 Dec 2015 16:23:18 +0530 Received: from d28av05.in.ibm.com (localhost [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tB1ArGkW031636 for ; Tue, 1 Dec 2015 16:23:17 +0530 From: "Aneesh Kumar K.V" In-Reply-To: <20151130185328-mutt-send-email-mst@redhat.com> References: <20151130105044.12269.21261.stgit@bahia.huguette.org> <20151130150353-mutt-send-email-mst@redhat.com> <20151130144631.4736280b@bahia.local> <20151130185328-mutt-send-email-mst@redhat.com> Date: Tue, 01 Dec 2015 16:23:11 +0530 Message-ID: <878u5eqw2w.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] mmap-alloc: use same backend for all mappings List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , Greg Kurz Cc: Paolo Bonzini , qemu-devel@nongnu.org "Michael S. Tsirkin" writes: > On Mon, Nov 30, 2015 at 02:46:31PM +0100, Greg Kurz wrote: >> On Mon, 30 Nov 2015 15:06:33 +0200 >> "Michael S. Tsirkin" wrote: >> .... >> >> On ppc64, the address space is divided in 256MB-sized segments where all pages >> have the same size. This is a hw limitation IIUC. I don't know if it can be >> fixed and I'll let Ben comment on it. > > But it's anonymous memory with PROT_NONE. There should be no pages there: > just a chunk of virtual memory reserved. > ppc64 use page size (called as base page size) to find the hash slot in which we find the virtual address to real address translation. All the pages in a segment should have same base page size. Hugetlb pages have a base page size of 16M whereas a regular linux page have 64K. mmap will fail to map a hugetlb mapping in a segment that already have regular pages mapped. -aneesh