Received: by 10.213.65.68 with SMTP id h4csp858109imn; Wed, 28 Mar 2018 14:20:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+sPpN02etH/Ut8z8dLaAP/u4hMXenqQxO58ANDHyTtiQW55/OqmOz59G0Jgghi8TY7mgL3 X-Received: by 2002:a17:902:36a:: with SMTP id 97-v6mr5288195pld.186.1522272039124; Wed, 28 Mar 2018 14:20:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522272039; cv=none; d=google.com; s=arc-20160816; b=Zbc3MwqVIwr0W7ylEtJL6JTeLLKQQtlqWovXP1Tiwh/+kK8MRnSderTprffVaN98oo CHZiY8TK2Bg5m2x7r3o/QLxvpIdYdA+i3Wg5gmr4NSqFnWFwh0/rrOjbMfXhfayoSL+2 81aUAWNFEH3vQhlWX3s/iA7ggEYoWmIHKN4eG/WI+CRnuscZZtIX2VmeLpwAehJLHzTw QOhX7HoqJHQms/Lyj3naQw9V0MkJoT4IHnuRlsU9r9sZaRWdxtgYeGnJwcmMTjtrbTga zXBkkBpOEIBpGlh3EmilT2T5mb/zqb+kk3OZUR5+yhuqrdCc80Kx95xOIyHckEwAd1xE SFEw== 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=brvK6XZ7b+n8QkhjdsggIJAf7yaLNvz7v6SHnm+DHoc=; b=MY47ICwlib2mTgxakQMw35IHdZ+o54colx5esVl8IJmJ8Y7rgymcyQz4ziM66ruk7/ ZuVXAvaTMUeeds+fVFbWpgbn4fkskQSEFeyC6ttMnIJv2wDHWu86MuXpRbt/TlALzsTY ve8zLZ9r036/+r0Ux9aX7i2TrglFZWcYXjxjKNVwJoClB/Yn0ww5SnGPs6hmvp5sIaEe WZWjJrMTS0tgwLJMWPRZRzhjKvUEPHS9F7QFPYZgSxWgjc5syPcAJBN1wFR4vMVwXTeh S6x2eznseT7k0CVoX7vlrN5xA4MoizAg6AsqbHjlBF6dUSMWSd2On2cu3PreMMPmhsBr niqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fPC0xON6; 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 y92-v6si4347073plb.198.2018.03.28.14.20.25; Wed, 28 Mar 2018 14:20:39 -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=fPC0xON6; 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 S1753057AbeC1VSP (ORCPT + 99 others); Wed, 28 Mar 2018 17:18:15 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:42899 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752318AbeC1VSO (ORCPT ); Wed, 28 Mar 2018 17:18:14 -0400 Received: by mail-pf0-f194.google.com with SMTP id a16so1686299pfn.9 for ; Wed, 28 Mar 2018 14:18:14 -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=brvK6XZ7b+n8QkhjdsggIJAf7yaLNvz7v6SHnm+DHoc=; b=fPC0xON6KXHOmKcRyh3UWXMH67vv4qVL7bE+KMWyvJdtCeYiMlSdZniwOBEPsYoBcl nV0Fs5/8z8K/BjBYdTmjoeOAMlAaP31vk6x3aEsD0emSApl63vtGYe4BGu5rXAMffABE QMsKG0nu2bPdA6V9RBn8PB+IhLqgKnddUbKRkOma26tA7RuAaYlAhtB4PcgB1Sflmj68 GPyRJxhXVA8C9NuGnEZMRlo2QJIWpMEe0ER+DgdC0pMcsayku+LJVRbFMfMMwxPeBNe0 gADL4TMahFSnJW5LgU7SvnC9XXEo48FxEbN3WY0a1Jf04ju0+2si1SPsQqdSqkeE5+DH 7Y6A== 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=brvK6XZ7b+n8QkhjdsggIJAf7yaLNvz7v6SHnm+DHoc=; b=MeWmnAOZDYyBTRYaE2HNRPfbWzDo8M28e1L1D8yM69xhNFhVzELpL5KgWWTRluHwQm gE1/brZbRNOtrD5ml6bsOLgFoEyylW/rd+HQdqJWuAj5uY78c/AG9e+S1ghHZtYijT0q T3Z+HS2dvp9i5Jo/4E9o0ZYcYbuLaxVzzD7q14Jz/Ov8pENJcjvS1O6plBOYI2ixpj7e 5hUOACKvFoLqe5KpHpbJ1lefpnurld8fH4SCyBEYeD6DmV6n2kkZt1kQAQo+YCgyjpIY pzZe8zqdB/HNytptUbJ7PG88hlCMKWjzjfp6RImIx90XlKrRsS9noRSvy7hRMlO8tnim 3yhQ== X-Gm-Message-State: AElRT7FHhRusUMvvFqCMYbj3lsUKQgVrNd770t0V/ti3Oc2rYPmplxmE CKlUlfXF/No6Q6b7bOipLaaqcA== X-Received: by 2002:a17:902:464:: with SMTP id 91-v6mr5344439ple.126.1522271893606; Wed, 28 Mar 2018 14:18:13 -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 p6sm7022634pgq.53.2018.03.28.14.18.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Mar 2018 14:18:12 -0700 (PDT) Date: Wed, 28 Mar 2018 14:18:11 -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: 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: > > 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. > > I agree, but I think it would be important to get the per architecture > enablement to avoid complex check here. For instance in the case of powerPC > this is only supported for PPC_BOOK3S_64. > > To avoid exposing such per architecture define here, what do you think about > having supporting architectures setting ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT > and the SPECULATIVE_PAGE_FAULT depends on this, like this: > > In mm/Kconfig: > config SPECULATIVE_PAGE_FAULT > bool "Speculative page faults" > depends on ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT && SMP > default y > help > ... > > In arch/powerpc/Kconfig: > config PPC > ... > select ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT if PPC_BOOK3S_64 > > In arch/x86/Kconfig: > config X86_64 > ... > select ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT > > Looks good to me! It feels like this will add more assurance that if things regress for certain workloads that it can be disabled. I don't feel strongly about the default value, I'm ok with it being enabled by default.