Received: by 10.213.65.68 with SMTP id h4csp298406imn; Wed, 28 Mar 2018 03:56:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx48z7+mJtLE4VNSAkdcSF4bHMmOVBbAIhJzJSnmKME/vs6E3eLzr15lf82uO4htewEzOQyMf X-Received: by 10.101.89.5 with SMTP id f5mr2210597pgu.428.1522234591432; Wed, 28 Mar 2018 03:56:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522234591; cv=none; d=google.com; s=arc-20160816; b=FTJQiuIqURefkPYv3zvSJn2A1c6FMQmx4CNib3U22cOTBZEtLhPaaeJJCRTbc4/7n5 CQiUtTA4oaexB2xGaoHTk0BUYNY35Fgk3mrU/+L5ANNQmohblKBDSBD9puz/DxlTN6RG Ax5YoeEMqE+Muq5YZbmQR5YQrxEY7PosTyalBwPRYuxip8G8K471+wsLRmpTuqJHwrjQ ooChQz9NKGCAvN81GrAwj2PWdYeAp3cWlnUqj6He76XaWcqDo8BaWGmETTB3M1Dg5xWG EsKFEgZWNJ3ohzDg0LpcRTMREpAbcZv1iIX2INP1xJZtRGMDy34iLKpS9/uxa9YkI9m/ rJiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=4iiqnjBZ5B/6NSiNGMSQchm3PLFnhlbGiAICyzwE15w=; b=mp5UpoIUHiSDyAhIesKv7DeoUkBMxr3/nnCiObkTarMedIAyegvySyLADsdGFE2oKV VHUfENETrZL6uA+H2tQSVLES5vocvqOsZhICHqjDbFp2nbo1X7QYf2WlLAi6y12vjRqE sr5phxOW3H/Tr8zLQptPR2m5xJXLTAR3ngfrmFAf7Rr5G9szYXY+1O2jbDK2I2eFWkzV XZJrW+jW+kc1Nnw6m7eShKGBoZ0I8kRkloA1RUn51zQtQLqjpTMWV4oV7ggsAvHdrxfZ 87x1Y7Nw0t2Ei1uzPdecMKRVKaWeAiWQqXTDevQuyCqbofSb45SSbJFOW0MPV2OejB8P hsLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hDr8F279; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u69si2596006pfg.292.2018.03.28.03.56.16; Wed, 28 Mar 2018 03:56:31 -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=@google.com header.s=20161025 header.b=hDr8F279; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751903AbeC1KRB (ORCPT + 99 others); Wed, 28 Mar 2018 06:17:01 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:39589 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbeC1KQ7 (ORCPT ); Wed, 28 Mar 2018 06:16:59 -0400 Received: by mail-it0-f66.google.com with SMTP id e98-v6so2956181itd.4 for ; Wed, 28 Mar 2018 03:16:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=4iiqnjBZ5B/6NSiNGMSQchm3PLFnhlbGiAICyzwE15w=; b=hDr8F279r485QfzNLCBlfG1PlDwVXkAinh1Urf4Z57S8NfZxG1jN1K0oSyp1IUbU4Q pfg2juI6qz/LjrWGM/T6T3uhrO3QxVrQ+M9EoQCkJ0iQKkG31hSO08YzlF0eMSGHFjQT YqVOXmdKt+27C10vbAsLhWCGFdsm4RcTrBtPjnc8+as0SLhLvGxZK0KdQEuup0tFdU3l JsrmdNN/vsHcdBRQ5OIqSDai+dUIBk9luEuu+iEm/XiT3dlQvj2iSlcPK6kHt6YKb4qp rHHkmi4sZHI57tlmAhSDAAi8NtsbkmOSf0x1HzMwgxBxpG49HMAvLBOPtRFPwQNOQ7Ew K0mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=4iiqnjBZ5B/6NSiNGMSQchm3PLFnhlbGiAICyzwE15w=; b=YkCGNVWlh0FmsvcrMD2HdZDdyg2f2v33clj5uXdKaVTX8d2ZC0HAFbAqcsWLWTYq1E TJ6O9NzP46PnmFqTpTb1sQZHnb5AyDxhfTSMH4tszoyZhJsXlJbsjsilviB/cv5iYArV AqMO4yzgBxzT1vvK/nJstKEL+5Zq0sRqcMKxnavykxm6UPUITaK7RtHX04GsvmiUwEjy OHDAiw/bth/O1s2e7oXMu4ARrpVSUXD5VsVy8ZmksswQtl/UrO1ybIfry2nG38P9fZ0q BFCIsONf/EWQoNo2nz8iSGUZUUF9oMrDyHMYy3bGqPPRz4y1oNlBuLLeIFQ78lYOEKSf Qv5w== X-Gm-Message-State: AElRT7Fqhs2RJAWkvwvDyTjW2m6Aqgx0c16ug2lHmnrCiHqNtIHAs8Xl zEPOjOUC1Oa3ZbhjqLSVn/cN9Q== X-Received: by 2002:a24:1c94:: with SMTP id c142-v6mr2658585itc.79.1522232218468; Wed, 28 Mar 2018 03:16:58 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id l124-v6sm2640113ite.20.2018.03.28.03.16.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Mar 2018 03:16:57 -0700 (PDT) Date: Wed, 28 Mar 2018 03:16:55 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Laurent Dufour cc: Thomas Gleixner , paulmck@linux.vnet.ibm.com, peterz@infradead.org, akpm@linux-foundation.org, kirill@shutemov.name, ak@linux.intel.com, mhocko@kernel.org, dave@stgolabs.net, jack@suse.cz, Matthew Wilcox , benh@kernel.crashing.org, mpe@ellerman.id.au, paulus@samba.org, Ingo Molnar , hpa@zytor.com, Will Deacon , Sergey Senozhatsky , Andrea Arcangeli , Alexei Starovoitov , kemi.wang@intel.com, sergey.senozhatsky.work@gmail.com, Daniel Jordan , linux-kernel@vger.kernel.org, linux-mm@kvack.org, haren@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com, npiggin@gmail.com, bsingharora@gmail.com, Tim Chen , linuxppc-dev@lists.ozlabs.org, x86@kernel.org Subject: Re: [PATCH v9 01/24] mm: Introduce CONFIG_SPECULATIVE_PAGE_FAULT In-Reply-To: <32c80b6a-28c6-bf63-ed7b-6a042ae18e8f@linux.vnet.ibm.com> Message-ID: References: <1520963994-28477-1-git-send-email-ldufour@linux.vnet.ibm.com> <1520963994-28477-2-git-send-email-ldufour@linux.vnet.ibm.com> <32c80b6a-28c6-bf63-ed7b-6a042ae18e8f@linux.vnet.ibm.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 28 Mar 2018, Laurent Dufour wrote: > >> This configuration variable will be used to build the code needed to > >> handle speculative page fault. > >> > >> By default it is turned off, and activated depending on architecture > >> support. > >> > >> Suggested-by: Thomas Gleixner > >> Signed-off-by: Laurent Dufour > >> --- > >> mm/Kconfig | 3 +++ > >> 1 file changed, 3 insertions(+) > >> > >> diff --git a/mm/Kconfig b/mm/Kconfig > >> index abefa573bcd8..07c566c88faf 100644 > >> --- a/mm/Kconfig > >> +++ b/mm/Kconfig > >> @@ -759,3 +759,6 @@ config GUP_BENCHMARK > >> performance of get_user_pages_fast(). > >> > >> See tools/testing/selftests/vm/gup_benchmark.c > >> + > >> +config SPECULATIVE_PAGE_FAULT > >> + bool > > > > Should this be configurable even if the arch supports it? > > Actually, this is not configurable unless by manually editing the .config file. > > I made it this way on the Thomas's request : > https://lkml.org/lkml/2018/1/15/969 > > That sounds to be the smarter way to achieve that, isn't it ? > Putting this in mm/Kconfig is definitely the right way to go about it instead of any generic option in arch/*. My question, though, was making this configurable by the user: config SPECULATIVE_PAGE_FAULT bool "Speculative page faults" depends on X86_64 || PPC default y help .. It's a question about whether we want this always enabled on x86_64 and power or whether the user should be able to disable it (right now they can't). With a large feature like this, you may want to offer something simple (disable CONFIG_SPECULATIVE_PAGE_FAULT) if someone runs into regressions.