Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1413881ybz; Fri, 1 May 2020 22:51:07 -0700 (PDT) X-Google-Smtp-Source: APiQypLItGFOeNiATGsVzoOx33D76swgp81Svmeyh9mirIdygLFT5uy/4w+8PsOlgPvRHUhbGZPC X-Received: by 2002:a17:906:7c0c:: with SMTP id t12mr6527618ejo.2.1588398667356; Fri, 01 May 2020 22:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588398667; cv=none; d=google.com; s=arc-20160816; b=jsJNjZkYaqa+8Pis2584fUB3o2vvWQ3CKGvN+qa/OETOCxNa40gRbyltBzUXoYwSIK VTsgL5iNghw1rxYwnBqyLb84/5wQCabuvaaNffT71ILkANdXiQqB2bsoNep7vchYt/5F 7XkyzWs1YcNxjV4TgbgAVIBU2tYRi1IeAn8ywjmGJAyWASdEyIsD8AA7ZL9BJaPY4BIw 0GihMfIic92Lg8YRZsaWb36ttLfizaJG+9uRzsu+KC5ozQf86rPyevFKotiGYmRcBH5e /JxCbGgpw0wCuifXddpU8eR5QTR4waH9O8LBT5CjIUuLKTaCEpEQtJ+mqQe4N+3QcgIY 4riQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=9WVhNWEwbrdSv0IZ+XjrYrQTjZYFLJxQOn+wzBze+IE=; b=zDb3KkrRTsGQDRHbHZgkbiHquXb8jZ75BX8Pwy0wYhJ29/5KUuaUtjeYcxvsUi0jh6 +f8hE59L4IrqtFYji96PaYy2XvwYp6sYx4CjZ/Yg8fyYgaARe8Tkm7eUT56XDnW1S2Xc qiYeOxi4g44UykXH26+ccn/iOZZpXOM8Xz6z+sdj+ulf8WSbxlXIvD1le9Va84zJ2qIi VVsJ6ohJ52DzHwNbmlDeWWDm+0M8gBOrxbkU4vFGtZlbXLX2FZyuJZBzKjY4+mdXOYUB 1Yb0g44s6YuN4+olTPaJsua/c5wTF2BaDxCPiZseWj/Vzlm4z3f/KRkXOvQfeRQwECgW mivw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=jJbUjZIF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c21si3223747ejk.82.2020.05.01.22.50.29; Fri, 01 May 2020 22:51:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=jJbUjZIF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726565AbgEBFrk (ORCPT + 99 others); Sat, 2 May 2020 01:47:40 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:6530 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726439AbgEBFrj (ORCPT ); Sat, 2 May 2020 01:47:39 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 01 May 2020 22:46:31 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 01 May 2020 22:47:39 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 01 May 2020 22:47:39 -0700 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 2 May 2020 05:47:38 +0000 Received: from [10.2.59.220] (10.124.1.5) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 2 May 2020 05:47:37 +0000 Subject: Re: [PATCH hmm v2 1/5] mm/hmm: make CONFIG_DEVICE_PRIVATE into a select To: Jason Gunthorpe , , Ralph Campbell CC: Alex Deucher , , Ben Skeggs , =?UTF-8?Q?Christian_K=c3=b6nig?= , "David (ChunMing) Zhou" , , Felix Kuehling , Christoph Hellwig , , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , , Niranjana Vishwanathapura , , "Yang, Philip" References: <1-v2-b4e84f444c7d+24f57-hmm_no_flags_jgg@mellanox.com> X-Nvconfidentiality: public From: John Hubbard Message-ID: <17b40a00-658a-1bf4-c14a-7543dd0d2f8c@nvidia.com> Date: Fri, 1 May 2020 22:47:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <1-v2-b4e84f444c7d+24f57-hmm_no_flags_jgg@mellanox.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To DRHQMAIL107.nvidia.com (10.27.9.16) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1588398391; bh=9WVhNWEwbrdSv0IZ+XjrYrQTjZYFLJxQOn+wzBze+IE=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=jJbUjZIFpsl+z/WpjRf+dQtCXmX45b2domJ6ui2m0qQLXPCNWeAK2d+Lt4SbMdTHW g6h3pk5CkJS4IW8FgDWLONNamvZn4bouhO81p+K/1DKwCbicz1zs5jlW7h5lYehaw/ clXb1ncut+A5uh78Ae8RCl1Pxjlxo56PG1PTgpCitHzCJSjToSTeViTPgNwElLgtfg qk2aJkzLeiGCZUHBkqurTPk4fTAp+5LR5mZhDn33zl2pf7bJhWSK1TYnaIbhFSoqYr /cE70NsFQkUcb0lx6FJJ0mKaFJCNfqcecIhbKwZbc17bnzzdzQMurqGa0/qeJJkiSP Uti4fpB1h8oTA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-05-01 11:20, Jason Gunthorpe wrote: > From: Jason Gunthorpe > > There is no reason for a user to select this or not directly - it should > be selected by drivers that are going to use the feature, similar to how > CONFIG_HMM_MIRROR works. Yes, this is a nice touch. Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA > > Currently all drivers provide a feature kconfig that will disable use of > DEVICE_PRIVATE in that driver, allowing users to avoid enabling this if > they don't want the overhead. > > Acked-by: Felix Kuehling > Reviewed-by: Christoph Hellwig > Signed-off-by: Jason Gunthorpe > --- > arch/powerpc/Kconfig | 2 +- > drivers/gpu/drm/nouveau/Kconfig | 2 +- > mm/Kconfig | 7 +------ > 3 files changed, 3 insertions(+), 8 deletions(-) > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 924c541a926008..8de52aefdc74cc 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -455,7 +455,7 @@ config PPC_TRANSACTIONAL_MEM > config PPC_UV > bool "Ultravisor support" > depends on KVM_BOOK3S_HV_POSSIBLE > - depends on DEVICE_PRIVATE > + select DEVICE_PRIVATE > default n > help > This option paravirtualizes the kernel to run in POWER platforms that > diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig > index d6e4ae1ef7053a..af5793f3e7c2cf 100644 > --- a/drivers/gpu/drm/nouveau/Kconfig > +++ b/drivers/gpu/drm/nouveau/Kconfig > @@ -86,10 +86,10 @@ config DRM_NOUVEAU_BACKLIGHT > > config DRM_NOUVEAU_SVM > bool "(EXPERIMENTAL) Enable SVM (Shared Virtual Memory) support" > - depends on DEVICE_PRIVATE > depends on DRM_NOUVEAU > depends on MMU > depends on STAGING > + select DEVICE_PRIVATE > select HMM_MIRROR > select MMU_NOTIFIER > default n > diff --git a/mm/Kconfig b/mm/Kconfig > index c1acc34c1c358c..7ca36bf5f5058e 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -805,15 +805,10 @@ config HMM_MIRROR > depends on MMU > > config DEVICE_PRIVATE > - bool "Unaddressable device memory (GPU memory, ...)" > + bool > depends on ZONE_DEVICE > select DEV_PAGEMAP_OPS > > - help > - Allows creation of struct pages to represent unaddressable device > - memory; i.e., memory that is only accessible from the device (or > - group of devices). You likely also want to select HMM_MIRROR. > - > config FRAME_VECTOR > bool > >