Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6282385imu; Wed, 30 Jan 2019 11:58:02 -0800 (PST) X-Google-Smtp-Source: ALg8bN7UW3TkAYvjagO+ScCrsFjpRPYG7bXNa5QFSk/bYlEAxgV3OgNs/xm1BzdDl0zO3ANYvHYk X-Received: by 2002:a63:f811:: with SMTP id n17mr29418046pgh.23.1548878282233; Wed, 30 Jan 2019 11:58:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548878282; cv=none; d=google.com; s=arc-20160816; b=hVLTnnwYolARss8nxOJWryhIs35hInNZcZ/iDlbHUuw62ciFzGKAVQF6heF1pdvxM6 RmWZQ1+G7Mjva48YdyEwRVOOiB7tEth8y689s8Z7M8KL4Wi+wRAHpaK8Cw6X2Xb+Wpe5 8FPFY1iLwZMi2GVCrlG1p79C1p+EkN2Xg+rTJTS1nFFAWbZkEYyEb1F3t4Ki+mKQEgVh T8Wx4PsQ7tR6hKkP41QDicBa9aqrm6YaHrGNtD6ljx6hh5LmoYTOb1BIyN3+MDYNIK57 5Prh8g67H8Vdtr3DNJ9axAk1C/m0MvUEPG/T8IqEnnP2+SnU2uT1yzPO2KJYrZJlDfJM LZ8w== 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:dkim-signature; bh=fMic4/srpVB+DYsvA4QhAeK3qc4LoYvthxknL+iJMzg=; b=tC4bwQI94mfdkJBRPrmN5+h9NF40z6imwESu5d60vcHvZBeT92l/+6+PKEfoa6O/pd nuRrLNpimp/1eLpxAo8AlurpnKSljR/JZ4JW1aL8ylm5ptnEoWwdWlj3B0FwxQjqxTxk FcCn5CaGtYDbLJMq/BxAXV4XRvi0ppdR7tL/HLJzRHQEAD+clUh+Hh141bAlZILE/UXB pdbSfQCSWJsSMu7UEK5BiMmcSofItXV7eO/FvAbBwu7vEqppVpF8SZRLdZ3/bInhgPrb c88+ferE/Nafo1V1w8nNX5m18PZjsBjW8AEHHmg0yyXJhIB+8owyqaNteVueQf4jD97B VqkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=UTY1SGIZ; 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=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x135si2138726pgx.579.2019.01.30.11.57.46; Wed, 30 Jan 2019 11:58:02 -0800 (PST) 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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=UTY1SGIZ; 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=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731622AbfA3T4Y (ORCPT + 99 others); Wed, 30 Jan 2019 14:56:24 -0500 Received: from mail-yw1-f67.google.com ([209.85.161.67]:37889 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728446AbfA3T4Y (ORCPT ); Wed, 30 Jan 2019 14:56:24 -0500 Received: by mail-yw1-f67.google.com with SMTP id d190so326180ywb.5 for ; Wed, 30 Jan 2019 11:56:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fMic4/srpVB+DYsvA4QhAeK3qc4LoYvthxknL+iJMzg=; b=UTY1SGIZ17Ji4JCx/FaPpx8PjOGUHB1YMloX7gBk7quvXg1Tb7ZXOaBphB3Z/rE2yM uNvyOdiD2p8otfbWN46RSJpSRiGqqegvTEfvHG/szoiTTufyH9/LHpC9Xt53gTwdW7Wc Cc2dAneaZr3lrHY2tB6a/YfpDmi0Lyp0z1pPJqMCKJYjcMFBsenC9y/FPrFTlVEQwSZ4 MwGgueU8QsYcSBwPiB34VffZgoPfzi8FSiCHuq3QjNNr3Rrbf278bXavmAD4dZiwTxGF OMUJE/8Cq5D2oXnHZdG26hXxxrHMDLWoalrFXUrBkwBszmriCxREvbIydRSsXWWF9C+c 490g== 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:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fMic4/srpVB+DYsvA4QhAeK3qc4LoYvthxknL+iJMzg=; b=N5YF6n7RC7JRPvvYq4EwzmA36lvmP3Xg5w5oJJ6xwefsihItXD7WI6pfMXbfQSWEeL tO6Xc0mxxxTIgPNzxXEIEmnReEsA9T5HJFprzmB8rsC5Yfpvet0g61/Y6UCM1CN3wyZw o7e/33zg4BSZhHWfehgF6vlFy/ZcpH3oURaoQc9+QKE6wPPIlFq8h0E0GLacttZdnVLD OOHmIYiWTctxjDFh+SN4H+6KDJOLPb72MgtBIMzDy9ePSngVsqen/JBsd6qDRYjE63pU dqg2EWtoEMtknQfotWgeb9c7chd2/SeQhpQPv6ATLoivYv9gRZCKmwoazZ68rsy+QUfm oDUw== X-Gm-Message-State: AJcUukfpMt7mZCNtnrVebA3fNyj2pU9/XjpKgRk3ehbhVQ18oHYf8LSx iZAf1/8bewIuSBcfDvQQXgzV2g== X-Received: by 2002:a81:b61a:: with SMTP id u26mr30162920ywh.250.1548878183201; Wed, 30 Jan 2019 11:56:23 -0800 (PST) Received: from localhost ([2620:10d:c091:200::5:6c95]) by smtp.gmail.com with ESMTPSA id d3sm910796ywh.58.2019.01.30.11.56.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jan 2019 11:56:22 -0800 (PST) Date: Wed, 30 Jan 2019 14:56:21 -0500 From: Johannes Weiner To: Borislav Petkov Cc: Babu Moger , linux-kernel@vger.kernel.org, Fenghua Yu , Reinette Chatre , Tony Luck Subject: Re: [PATCH] x86: avoid confusion over the new RESCTRL config prompt Message-ID: <20190130195621.GA30653@cmpxchg.org> References: <20190129225218.15441-1-hannes@cmpxchg.org> <20190129230845.GG28773@zn.tnic> <20190130164626.GA17841@cmpxchg.org> <20190130171933.GC21221@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190130171933.GC21221@zn.tnic> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 30, 2019 at 06:19:33PM +0100, Borislav Petkov wrote: > On Wed, Jan 30, 2019 at 11:46:26AM -0500, Johannes Weiner wrote: > > This is still awefully close to the cgroup CPU resource > > controller. Since it's more hardware-specific, and the config symbol > > also has the x86 in it, how about "x86 CPU resource control support"? > > Fine by me. > > What about > > s/X86_RESCTRL/X86_CPU_RESCTRL/g Good idea. Tony, Babu, that look okay to you guys as well? --- From 9ca5fa615f9f5d270c141266c454059a3de2cd39 Mon Sep 17 00:00:00 2001 From: Johannes Weiner Date: Tue, 29 Jan 2019 17:44:36 -0500 Subject: [PATCH] x86: avoid confusion over the new X86_RESCTRL config "Resource Control" is a very broad term for this CPU feature, and a term that is also associated with containers, cgroups etc. This can easily cause confusion. Make the user prompt more specific. Match the config symbol name. Signed-off-by: Johannes Weiner --- Documentation/x86/resctrl_ui.txt | 2 +- arch/x86/Kconfig | 6 +++--- arch/x86/include/asm/resctrl_sched.h | 4 ++-- arch/x86/kernel/cpu/Makefile | 2 +- arch/x86/kernel/cpu/resctrl/Makefile | 4 ++-- include/linux/sched.h | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Documentation/x86/resctrl_ui.txt b/Documentation/x86/resctrl_ui.txt index e8e8d14d3c4e..c1f95b59e14d 100644 --- a/Documentation/x86/resctrl_ui.txt +++ b/Documentation/x86/resctrl_ui.txt @@ -9,7 +9,7 @@ Fenghua Yu Tony Luck Vikas Shivappa -This feature is enabled by the CONFIG_X86_RESCTRL and the x86 /proc/cpuinfo +This feature is enabled by the CONFIG_X86_CPU_RESCTRL and the x86 /proc/cpuinfo flag bits: RDT (Resource Director Technology) Allocation - "rdt_a" CAT (Cache Allocation Technology) - "cat_l3", "cat_l2" diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 26387c7bf305..68261430fe6e 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -446,12 +446,12 @@ config RETPOLINE branches. Requires a compiler with -mindirect-branch=thunk-extern support for full protection. The kernel may run slower. -config X86_RESCTRL - bool "Resource Control support" +config X86_CPU_RESCTRL + bool "x86 CPU resource control support" depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD) select KERNFS help - Enable Resource Control support. + Enable x86 CPU resource control support. Provide support for the allocation and monitoring of system resources usage by the CPU. diff --git a/arch/x86/include/asm/resctrl_sched.h b/arch/x86/include/asm/resctrl_sched.h index 40ebddde6ac2..f6b7fe2833cc 100644 --- a/arch/x86/include/asm/resctrl_sched.h +++ b/arch/x86/include/asm/resctrl_sched.h @@ -2,7 +2,7 @@ #ifndef _ASM_X86_RESCTRL_SCHED_H #define _ASM_X86_RESCTRL_SCHED_H -#ifdef CONFIG_X86_RESCTRL +#ifdef CONFIG_X86_CPU_RESCTRL #include #include @@ -88,6 +88,6 @@ static inline void resctrl_sched_in(void) static inline void resctrl_sched_in(void) {} -#endif /* CONFIG_X86_RESCTRL */ +#endif /* CONFIG_X86_CPU_RESCTRL */ #endif /* _ASM_X86_RESCTRL_SCHED_H */ diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile index b6fa0869f7aa..cfd24f9f7614 100644 --- a/arch/x86/kernel/cpu/Makefile +++ b/arch/x86/kernel/cpu/Makefile @@ -39,7 +39,7 @@ obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o obj-$(CONFIG_X86_MCE) += mce/ obj-$(CONFIG_MTRR) += mtrr/ obj-$(CONFIG_MICROCODE) += microcode/ -obj-$(CONFIG_X86_RESCTRL) += resctrl/ +obj-$(CONFIG_X86_CPU_RESCTRL) += resctrl/ obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o diff --git a/arch/x86/kernel/cpu/resctrl/Makefile b/arch/x86/kernel/cpu/resctrl/Makefile index 1cabe6fd8e11..4a06c37b9cf1 100644 --- a/arch/x86/kernel/cpu/resctrl/Makefile +++ b/arch/x86/kernel/cpu/resctrl/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_X86_RESCTRL) += core.o rdtgroup.o monitor.o -obj-$(CONFIG_X86_RESCTRL) += ctrlmondata.o pseudo_lock.o +obj-$(CONFIG_X86_CPU_RESCTRL) += core.o rdtgroup.o monitor.o +obj-$(CONFIG_X86_CPU_RESCTRL) += ctrlmondata.o pseudo_lock.o CFLAGS_pseudo_lock.o = -I$(src) diff --git a/include/linux/sched.h b/include/linux/sched.h index d2f90fa92468..bba3afb4e9bf 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -995,7 +995,7 @@ struct task_struct { /* cg_list protected by css_set_lock and tsk->alloc_lock: */ struct list_head cg_list; #endif -#ifdef CONFIG_X86_RESCTRL +#ifdef CONFIG_X86_CPU_RESCTRL u32 closid; u32 rmid; #endif -- 2.20.1