Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3129292ybi; Thu, 18 Jul 2019 21:36:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6MOE3OUfys+5PIWHimh3B6pf9zeNSv9U1IFaHCwBDs/C+Cb6my5YOBdAFsxmSlwkG8+PA X-Received: by 2002:a17:90a:d343:: with SMTP id i3mr57600797pjx.15.1563510963416; Thu, 18 Jul 2019 21:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563510963; cv=none; d=google.com; s=arc-20160816; b=Ek3WhJUQevAyBr7DkuZ3G4z6qAvy2TbuZc3jI5yGeJwgoWDJCSbWy3dCwqZG0ZHZNs z004fJ+wtV97fYGff9j+QxXMNm+qw6m7tWP5lLXOQOLwBjtx5XWbD/jMPxKMFrTOSiod UFE2WeT9NzQIjWSd62I1EToKPaeCMYr9ugpwboDVskFfN9ulGfvXMpjVR/3Zu2bdV+nf 9v+sSPYrYOZcVkLw7+d61/jQBlsceR+lp5iWoEwGR0Xo9eeGnLHuTWTujvWzOIzJqBv7 xOHxU0pw5XAXj6Lsfx1vbqNXSCHnr58KbLoYp0ZUVlauROPeSX1pSNpyhaYzmv0rLiXT vyRQ== 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=nFCeS/I5i5tLsiUdNtJxe0z3U8Wsvu2Nm1SZYkKmrVc=; b=ppwLHrz17F95ajqKSKc7NBxt5c0zo/fXrrPBoRI2X5xne8wOg5mJ9NnCZ7siDwFL8i pBIdp9VH2UngzzsTK9PBIkzTUo/kZbB4oV4PfdsHEbzBLi3hyS2YS2KrRuDysRCL+/UR mFDmE+4Sb45F7aHNPVr3UB45d686EWREIBDOVktz5dHHjLRd4m+i7H3YldH4tscS4tq1 50bSGltxkjBE1EwpNu7zZZU0YUSsHTA2TvecnV4fPzgbs8+E8xliNffwLJko6htwhCue 7zvE70za/Ly0s4bm6Pqf0FQStCrF3RUhqXn1riV0vu9XwTObDDvyXJJTs6JyKibdrzYV R/wA== 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 z4si726263pgr.69.2019.07.18.21.35.47; Thu, 18 Jul 2019 21:36:03 -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 S1731074AbfGSEeo (ORCPT + 99 others); Fri, 19 Jul 2019 00:34:44 -0400 Received: from mga07.intel.com ([134.134.136.100]:22524 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731387AbfGSEem (ORCPT ); Fri, 19 Jul 2019 00:34:42 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 21:34:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,280,1559545200"; d="scan'208";a="168447576" Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by fmsmga008.fm.intel.com with ESMTP; 18 Jul 2019 21:34:40 -0700 Date: Thu, 18 Jul 2019 21:34:40 -0700 From: Ira Weiny To: john.hubbard@gmail.com Cc: pavel@ucw.cz, SCheung@nvidia.com, akpm@linux-foundation.org, aneesh.kumar@linux.vnet.ibm.com, benh@kernel.crashing.org, bsingharora@gmail.com, dan.j.williams@intel.com, dnellans@nvidia.com, ebaskakov@nvidia.com, hannes@cmpxchg.org, jglisse@redhat.com, jhubbard@nvidia.com, kirill.shutemov@linux.intel.com, linux-kernel@vger.kernel.org, liubo95@huawei.com, mhairgrove@nvidia.com, mhocko@kernel.org, paulmck@linux.vnet.ibm.com, ross.zwisler@linux.intel.com, sgutti@nvidia.com, torvalds@linux-foundation.org, vdavydov.dev@gmail.com, Jason Gunthorpe , Christoph Hellwig Subject: Re: [PATCH] mm/Kconfig: additional help text for HMM_MIRROR option Message-ID: <20190719043439.GA26230@iweiny-DESK2.sc.intel.com> References: <20190717074124.GA21617@amd> <20190719013253.17642-1-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190719013253.17642-1-jhubbard@nvidia.com> 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 Thu, Jul 18, 2019 at 06:32:53PM -0700, john.hubbard@gmail.com wrote: > From: John Hubbard > > The HMM_MIRROR option in Kconfig is a little underdocumented and > mysterious, and leaves people wondering whether to enable it. > > Add text explaining just a little bit more about HMM, and also > mention which hardware would benefit from having HMM_MIRROR > enabled. > > Suggested-by: Pavel Machek > Cc: Balbir Singh > Cc: Dan Williams > Cc: Jason Gunthorpe > Cc: Jerome Glisse > Cc: Christoph Hellwig > Signed-off-by: John Hubbard > --- > > Hi Pavel and all, does this help? I've tried to capture the key missing bits > of documentation, but still keep it small, for Kconfig. > > thanks, > John Hubbard > NVIDIA > > mm/Kconfig | 17 ++++++++++++----- > 1 file changed, 12 insertions(+), 5 deletions(-) > > diff --git a/mm/Kconfig b/mm/Kconfig > index 56cec636a1fc..2fcb92e7f696 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -681,11 +681,18 @@ config HMM_MIRROR > depends on MMU && 64BIT > select MMU_NOTIFIER > help > - Select HMM_MIRROR if you want to mirror range of the CPU page table of a > - process into a device page table. Here, mirror means "keep synchronized". > - Prerequisites: the device must provide the ability to write-protect its > - page tables (at PAGE_SIZE granularity), and must be able to recover from > - the resulting potential page faults. > + This is Heterogeneous Memory Management (HMM) process address space > + mirroring. > + > + HMM_MIRROR provides a way to mirror ranges of the CPU page tables > + of a process into a device page table. Here, mirror means "keep > + synchronized". Prerequisites: the device must provide the ability > + to write-protect its page tables (at PAGE_SIZE granularity), and > + must be able to recover from the resulting potential page faults. > + > + Select HMM_MIRROR if you have hardware that meets the above > + description. An early, partial list of such hardware is: > + an NVIDIA GPU >= Pascal, Mellanox IB >= mlx5, or an AMD GPU. I don't think we want to put device information here. If we want that information in Kconfig best to put it in the devices themselves. Otherwise this list will get stale. Other than that, looks good. Reviewed-by: Ira Weiny Ira > > config DEVICE_PRIVATE > bool "Unaddressable device memory (GPU memory, ...)" > -- > 2.22.0 >