From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e28smtp05.in.ibm.com (e28smtp05.in.ibm.com [125.16.236.5]) (using TLSv1.2 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3r3r6Z2kJczDq5s for ; Tue, 10 May 2016 17:12:22 +1000 (AEST) Received: from localhost by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 10 May 2016 12:42:18 +0530 Received: from d28relay07.in.ibm.com (d28relay07.in.ibm.com [9.184.220.158]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 2B782125805E for ; Tue, 10 May 2016 12:44:21 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay07.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u4A7CDol35455206 for ; Tue, 10 May 2016 12:42:13 +0530 Received: from d28av02.in.ibm.com (localhost [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u4A7CBGh031796 for ; Tue, 10 May 2016 12:42:12 +0530 Message-ID: <573189CA.8090205@linux.vnet.ibm.com> Date: Tue, 10 May 2016 12:42:10 +0530 From: Anshuman Khandual MIME-Version: 1.0 To: "Aneesh Kumar K.V" , oliver CC: Michael Neuling , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 0/2] Enable ZONE_DEVICE on POWER References: <1462450304-19173-1-git-send-email-khandual@linux.vnet.ibm.com> <87r3dgk1bh.fsf@skywalker.in.ibm.com> <572C2801.7050605@linux.vnet.ibm.com> <877ff4jvsh.fsf@skywalker.in.ibm.com> In-Reply-To: <877ff4jvsh.fsf@skywalker.in.ibm.com> Content-Type: text/plain; charset=utf-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 05/08/2016 11:07 PM, Aneesh Kumar K.V wrote: > oliver writes: > >> > Hi, >> > >> > I've been working on kernel support for a persistent memory (nvdimm) >> > device and the kernel driver infrastructure requires ZONE_DEVICE for >> > DAX support.. I've had it enabled in my tree for some time (without >> > altmap support) without any real issues. > > IIUC a DAX usage of pmem doesn't really need ZONE_DEVICE. It is only > for struct page backing to those pmem area we need ZONE_DEVICE. > >> > >> > I wasn't planning on upstreaming any of my changes until 4.8 at the >> > earliest so I am ok with carrying these patches myself. However, there >> > has been some interest in using ZONE_DEVICE for other things on ppc >> > (wasn't that you?) and given that ZONE_DEVICE is gated behind >> > CONFIG_EXPERT I can't see there being any kind of negative impact on >> > end users by merging it now. At the very least it lets the rest of the >> > kernel development community know that changes affecting zones should >> > also be tested on powerpc. >> > >> > > A partially done patch like that will miss quiet a lot details. For > example if I look at the x86 changes related to altmap > (4b94ffdc4163bae1e ("x86, mm: introduce vmem_altmap to augment > vmemmap_populate")) i see them handling pagetable free and memory > hotplug. This patch doesn't do any of those. From the commit message it is > also not clear how we intent to use those zone device memory on ppc64. > If we say they will not get hotplugged out or they will never be part > of page table then those changes I mentioned above are really not > needed. But the patch is missing a lot of those details. Right. The current patch just enables ZONE_DEVICE with vmem_altmap support (so that struct pages can be allocated in the device range instead of system RAM) where any driver can own the rest of the PFNs for its use. Right now these PFNs will not make into process page table. I can update the commit message with these details if you like.