Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2498552yba; Sun, 7 Apr 2019 21:04:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqztRZOGX+xPZ7ZkjrCTbc9aIJqJDZDH6ZE4JFxH3rTe5CVWeV2h6441Vq/ry45gd0aR8cqd X-Received: by 2002:a17:902:b713:: with SMTP id d19mr28208654pls.54.1554696294413; Sun, 07 Apr 2019 21:04:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554696294; cv=none; d=google.com; s=arc-20160816; b=sialv7bfzTf01RVDEw8mglkrADs5N4ORxlnXiGv7M2BaP7BaqciQVeIUSQY6qZODDp UVcAZusKTWEgdqqdPcVdfHYiUcHuJtEtK1meyL/rIZAK48KlcKI1MNxhrpIre6QqE8OQ 8bSqjSDfIUTebdOH980a24CvJ6XmI8HJ2rfCRw24XQV+H8pchliEQxJwfHis29TBtZ6M WCgLfa3oT3V+o9IEj14h0Qfa5yeCbK3Htc6rmS+gxXnohlx1tKjZUjFryU/s0EMQTBNU CfHaOF/cKJi5hQCnkshleGdxFHvV0H9JYbp/J1udgRHEKxR4ecYRUzb29ckPFeDVWgsd tSjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=WzP92kVoM+bBfdKq2rGy7ZTlOKLVoWferfTMQ9k5Cms=; b=ZKWkiGt9lVVor/Gzg3HdE4AYFNCMZUWh3BHILMM9YmN3ep7R/N57GOqlVz44nO6esG RuOvRYWwSOLY8uj3GUB7xeRqr0isd9S63c7XycPxdurcyAEM05lgYO2SuF1y2dGpWpoR pwMkNRlP/uGzEp65k6SAoWDjR+2HOdwXubrbUlP18yGUpPny1da6iAbpxUrmc6n6xsux UurCS94rO4Xy+3EGmm6sG3J9SWBmMFk03SRKGIDofS5qHQDz7EoCv6YQcpvsS8hSMQDo uLvoRDqaE9i+OZhUqub5yVIgL7tRYEX1+ape+MjYtLfCfVVWsp6u+ZXlASpihbff473d +gXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l32si25545324pgm.130.2019.04.07.21.04.38; Sun, 07 Apr 2019 21:04:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725947AbfDHED4 (ORCPT + 99 others); Mon, 8 Apr 2019 00:03:56 -0400 Received: from mga02.intel.com ([134.134.136.20]:6259 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725800AbfDHED4 (ORCPT ); Mon, 8 Apr 2019 00:03:56 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2019 21:03:54 -0700 X-IronPort-AV: E=Sophos;i="5.60,323,1549958400"; d="scan'208";a="132298528" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.157]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 07 Apr 2019 21:03:54 -0700 Date: Sun, 7 Apr 2019 21:03:47 -0700 From: Ira Weiny To: Dan Williams Cc: Robin Murphy , Anshuman Khandual , Linux Kernel Mailing List , linux-arm-kernel@lists.infradead.org, Linux MM , Andrew Morton , Will Deacon , Catalin Marinas , Michal Hocko , Mel Gorman , james.morse@arm.com, Mark Rutland , cpandya@codeaurora.org, arunks@codeaurora.org, osalvador@suse.de, Logan Gunthorpe , David Hildenbrand , cai@lca.pw, =?iso-8859-1?B?Suly9G1l?= Glisse Subject: Re: [PATCH 6/6] arm64/mm: Enable ZONE_DEVICE Message-ID: <20190408040346.GA26243@iweiny-DESK2.sc.intel.com> References: <1554265806-11501-1-git-send-email-anshuman.khandual@arm.com> <1554265806-11501-7-git-send-email-anshuman.khandual@arm.com> <0d72db39-e20d-1cbd-368e-74dda9b6c936@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 07, 2019 at 03:11:00PM -0700, Dan Williams wrote: > On Thu, Apr 4, 2019 at 2:47 AM Robin Murphy wrote: > > > > On 04/04/2019 06:04, Dan Williams wrote: > > > On Wed, Apr 3, 2019 at 9:42 PM Anshuman Khandual > > > wrote: > > >> > > >> > > >> > > >> On 04/03/2019 07:28 PM, Robin Murphy wrote: > > >>> [ +Dan, Jerome ] > > >>> > > >>> On 03/04/2019 05:30, Anshuman Khandual wrote: > > >>>> Arch implementation for functions which create or destroy vmemmap mapping > > >>>> (vmemmap_populate, vmemmap_free) can comprehend and allocate from inside > > >>>> device memory range through driver provided vmem_altmap structure which > > >>>> fulfils all requirements to enable ZONE_DEVICE on the platform. Hence just > > >>> > > >>> ZONE_DEVICE is about more than just altmap support, no? > > >> > > >> Hot plugging the memory into a dev->numa_node's ZONE_DEVICE and initializing the > > >> struct pages for it has stand alone and self contained use case. The driver could > > >> just want to manage the memory itself but with struct pages either in the RAM or > > >> in the device memory range through struct vmem_altmap. The driver may not choose > > >> to opt for HMM, FS DAX, P2PDMA (use cases of ZONE_DEVICE) where it may have to > > >> map these pages into any user pagetable which would necessitate support for > > >> pte|pmd|pud_devmap. > > > > > > What's left for ZONE_DEVICE if none of the above cases are used? > > > > > >> Though I am still working towards getting HMM, FS DAX, P2PDMA enabled on arm64, > > >> IMHO ZONE_DEVICE is self contained and can be evaluated in itself. > > > > > > I'm not convinced. What's the specific use case. > > > > The fundamental "roadmap" reason we've been doing this is to enable > > further NVDIMM/pmem development (libpmem/Qemu/etc.) on arm64. The fact > > that ZONE_DEVICE immediately opens the door to the various other stuff > > that the CCIX folks have interest in is a definite bonus, so it would > > certainly be preferable to get arm64 on par with the current state of > > things rather than try to subdivide the scope further. > > > > I started working on this from the ZONE_DEVICE end, but got bogged down > > in trying to replace my copied-from-s390 dummy hot-remove implementation > > with something proper. Anshuman has stepped in to help with hot-remove > > (since we also have cloud folks wanting that for its own sake), so is > > effectively coming at the problem from the opposite direction, and I'll > > be the first to admit that we've not managed the greatest job of meeting > > in the middle and coordinating our upstream story; sorry about that :) > > > > Let me freshen up my devmap patches and post them properly, since that > > discussion doesn't have to happen in the context of hot-remove; they're > > effectively just parallel dependencies for ZONE_DEVICE. > > Sounds good. It's also worth noting that Ira's recent patches for > supporting get_user_pages_fast() for "longterm" pins relies on > PTE_DEVMAP to determine when fast-GUP is safe to proceed, or whether > it needs to fall back to slow-GUP. So it really is the case that > "devmap" support is an assumption for ZONE_DEVICE. Could you cc me on the patches when you post? Thanks, Ira