Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1941944ybb; Fri, 29 Mar 2019 14:44:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTQgfyEeXqGtZyajCcc7p2/hvkbkSBcDOg2zkDcO+EvLiWacLXeASNr58L3UP9wrhxJX4V X-Received: by 2002:a17:902:2f43:: with SMTP id s61mr51613749plb.158.1553895841250; Fri, 29 Mar 2019 14:44:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553895841; cv=none; d=google.com; s=arc-20160816; b=xte30jI7s0D0JMcFGFS0uoxcBz8GEQwKZkGc/GHFPivxMWMVVGDSqt9v8AI/a9vRn0 Y2UDBMyRb8+GVeI5lGDbeya0Bf77OniRL+MSe1jN0i3I5jzPvqaJDdug/1H6mQmcnZ4l oOrTj3xh7blHtmvj23V8vKDNHNuCokH3hcT3kYxBpcXcLbxLe3QfVK2PnDMq8/oqy4Jt wv5ZsVJWaINk713hQtjNjSht5imJLEUAsGokGXBoW6wsZp62B8vyd479036o0FcqzXGz uPT49ZM91dAX6owSngPl92NEoW73H81zZ8O9rrHi+24hEp4F5oHHcE2LVd7IArzErqm5 rcyw== 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=ftvuRkYU+0Pcq3Bvvq5Vs+GUVHhY3V3UTjr/Mr6sOlA=; b=noaQ/w8hfz8nUSYv124BGrcJqEsKgRnmBNoR/e5StghmtRPaCivqGLR+slbIABYmXH jmNwIXT2i+8lzMbXLeJ/2lF7nCbNwPB6aRmz7l4cLWzE8udqKNz5F3AzS2TZNwkewgFp q8M73NTsNYuF2kkEuWNFeIXD/zejwSwCtl5wmpXNQERbT4BNfk9GNRWzTdy9XyhpzE1U jtagRNlvlTR06IodW4rDZfWdWmRMoHtzeE2l8AnpyfoyLKEWcgo9F0+vwa6i7W7QGyml Dk7RVhOUt+N9mU4q1vYPylWC8dsuUQnljINoWmanJgTqF1EA7bv/gwtdV8MnDXEPqNCg +Nuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=cq29vIO8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si2736336pfn.10.2019.03.29.14.43.45; Fri, 29 Mar 2019 14:44:01 -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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=cq29vIO8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730113AbfC2Vm7 (ORCPT + 99 others); Fri, 29 Mar 2019 17:42:59 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:7041 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729652AbfC2Vm7 (ORCPT ); Fri, 29 Mar 2019 17:42:59 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 29 Mar 2019 14:43:02 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Fri, 29 Mar 2019 14:42:58 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Fri, 29 Mar 2019 14:42:58 -0700 Received: from [10.110.48.28] (10.124.1.5) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 29 Mar 2019 21:42:58 +0000 Subject: Re: [PATCH v2 01/11] mm/hmm: select mmu notifier when selecting HMM To: Jerome Glisse CC: , , Ralph Campbell , Andrew Morton , Dan Williams References: <20190325144011.10560-1-jglisse@redhat.com> <20190325144011.10560-2-jglisse@redhat.com> <20190329211529.GA6124@redhat.com> From: John Hubbard X-Nvconfidentiality: public Message-ID: Date: Fri, 29 Mar 2019 14:42:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <20190329211529.GA6124@redhat.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL104.nvidia.com (172.18.146.11) To HQMAIL101.nvidia.com (172.20.187.10) Content-Type: text/plain; charset="utf-8" Content-Language: en-US-large Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1553895782; bh=ftvuRkYU+0Pcq3Bvvq5Vs+GUVHhY3V3UTjr/Mr6sOlA=; h=X-PGP-Universal:Subject:To:CC:References:From:X-Nvconfidentiality: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=cq29vIO84NPcmqlscz0xP2ghrrNtfG58xG8IeG2S5j3JMf2uMQT2PbH4VUxI9JrVP YSrp9EQQsZHAtWMWBtnl7retYbnRyovtnqaerVcmXnAOptOmijP2pAS+DDBDcUI2XV uzPDI4uNt/Zmk38Rokgisgmha45YMUJkFE+coI1kNeRRtFRXwOeq0N1hOO8GhS+vtW j88vpq+OMnYzqXEtRMs/2M5fedthcQaMTjshAXQErGygJCi3iPMAmnuUtCYyFkkwOv LvbNp2IIQSTJgXNxT+63xnvFbHhQmI47l2Y9D9+bDu1W79BhHAxT6jlsQ7+Ni19/dC YkX7pItTbh6gg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/29/19 2:15 PM, Jerome Glisse wrote: [...] >> Yes, this is a good move, given that MMU notifiers are completely, >> indispensably part of the HMM design and implementation. >> >> The alternative would also work, but it's not quite as good. I'm >> listing it in order to forestall any debate: >> >> config HMM >> bool >> + depends on MMU_NOTIFIER >> select MIGRATE_VMA_HELPER >> >> ...and "depends on" versus "select" is always a subtle question. But in >> this case, I'd say that if someone wants HMM, there's no advantage in >> making them know that they must first ensure MMU_NOTIFIER is enabled. >> After poking around a bit I don't see any obvious downsides either. > > You can not depend on MMU_NOTIFIER it is one of the kernel config > option that is not selectable. So any config that need MMU_NOTIFIER > must select it. > aha, thanks for explaining that point about the non-user-selectable items, I wasn't aware of that. (I had convinced myself that those were set by hard-coding a choice in one of the Kconfig files.) >> >> However, given that you're making this change, in order to avoid odd >> redundancy, you should also do this: >> >> diff --git a/mm/Kconfig b/mm/Kconfig >> index 0d2944278d80..2e6d24d783f7 100644 >> --- a/mm/Kconfig >> +++ b/mm/Kconfig >> @@ -700,7 +700,6 @@ config HMM >> config HMM_MIRROR >> bool "HMM mirror CPU page table into a device page table" >> depends on ARCH_HAS_HMM >> - select MMU_NOTIFIER >> select HMM >> help >> Select HMM_MIRROR if you want to mirror range of the CPU page table of a > > Because it is a select option no harm can come from that hence i do > not remove but i can remove it. > Yes, this is just a tiny housecleaning point, not anything earthshaking. thanks, -- John Hubbard NVIDIA