From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=192.198.163.10 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796187399; b=dXfyaZX0n7CdNZvdhYSr8Znl06UY7MeT3jfidLrKxu1H9gdHXFhs0nL0isiWSqJCPM2+ grbFVrwOvwwxiK3D/8nf9eqjrtit3IDrvlzM/csOWPOIa21L6j53KaVw0aRexhR9Dfjxx pK3moC4ZZYIceRz/aDnCt2EhBgOekYkNknY9CTSdP2lVe9tIMjTDYWaQWL3qq6uZh7HSX FiMmQQOTSRld1KKdsK6BJ+/V1lmja3PsTnbqOruv8NAqeruqMTLl82SdxswlbYSOCCfHg bRh4e6vtxc9xaiy6lvSy2KHCwpcwZiXEm/V0haia8md0D6GGksHCVNKFrkFLNYHdNAQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796187399; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Received: Received:Received:Received:Message-ID:Date:User-Agent:Subject:To:CC: References:From:Content-Language:In-Reply-To:Content-Type: Content-Transfer-Encoding:X-ClientProxiedBy:MIME-Version: X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id:X-MS-Exchange-SenderADCheck: X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam: X-Microsoft-Antispam-Message-Info:X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-Exchange-RoutingPolicyChecked: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; bh=2gLYJGe+oSYFwglbaBrBqNvT65+/bWwiss+iP78E++8=; b=tdsqecj/dpT+DGs3MJD3aITA7ZEfDSVUqsuwUSWQJCiPdOafe9apvaCvyA3TIiozBqPz Q73R8Wrc4g/RP/CfPaMShKYZLPOm9YrFg0thy3AucY3ZxYl92nKIJxKJwhVQJt6GdkzKz +4YQSJkCFDt4V2eLDkTb44o4E+AXSgzIKxA/tMB7SPdhAeJvFoAtJx8wlE8MW1jWAyAZo i3kLGq3oG4C8Ib0561i4mxVh5VDIve0FWaPjTe5oDfu5sxVQqie9m6IQiRKlE7w2CAbpE YVMPsBEYspNPnmsipsGb5mH+2lICwq7im71XjeFAWYh/7mz2/3YNhbKGIH/70PYZ24g== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=V2VvgrNM; arc=pass header.oldest-pass=0 smtp.remote-ip=192.198.163.10 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E55D0606A31A; Wed, 2 Dec 2026 04:56:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E55D0606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=V2VvgrNM DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796187399; x=1827723399; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=2gLYJGe+oSYFwglbaBrBqNvT65+/bWwiss+iP78E++8=; b=V2VvgrNMMPnrmxUr/wSGBhZIbViIZmY6oQacuCqMIz6dZYSzqyy56Y5e ik4uJRUL0fUPiFQP3RCXMdcPiTts0rdtHIThGcUyhva7fyHF954DBrlGs +KWEdfNJTefpfUSW8ARo0ry3MY7OR6oQ1u4qTrFwFI185jfJWi5sWjlDE AyAGyr5kT4COAEnAqFAFcY8zrd9zdgpQymWgkYegxIDMfQB9ayj+e1d2f 8uuT6Ho+WXq+t93gl9F4OTIq2Cpz2Q8IK1SKWsK/995vili/QtvZkNi5K D1evTt32bEiCCr2BBmBftUvYcHjtflwNw7xFTrQRGLG3+A8oD1Mz5DJD2 w==; X-CSE-ConnectionGUID: Xo8ToCIzT1em1Ui5YHLX9A== X-CSE-MsgGUID: kRTUPt6jQs+VIN/DEKm07g== X-IronPort-AV: E=McAfee;i="6800,10657,11983"; a="4978277" X-IronPort-AV: E=Sophos;i="6.27,246,1787036400"; d="scan'208";a="4978277" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2026 20:56:38 -0800 X-CSE-ConnectionGUID: xNmKvWi5Qnq1mM1dKiYj1A== X-CSE-MsgGUID: JHIwgYlESESxPAMM9PxTRQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,246,1787036400"; d="scan'208";a="13800728" Received: from fmsmsx902.amr.corp.intel.com ([10.18.126.91]) by fmviesa009.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2026 20:56:38 -0800 Received: from FMSMSX903.amr.corp.intel.com (10.18.126.92) by fmsmsx902.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Tue, 1 Dec 2026 20:56:37 -0800 Received: from fmsedg901.ED.cps.intel.com (10.1.192.143) by FMSMSX903.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57 via Frontend Transport; Tue, 1 Dec 2026 20:56:37 -0800 Received: from MW6PR02CU001.outbound.protection.outlook.com (52.101.48.69) by edgegateway.intel.com (192.55.55.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Tue, 1 Dec 2026 20:56:37 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UYw0Z6f5Nxn1ZHC+rLde3FxeOHWkzrefQQE+1y9ASaJwO7D++7qKY+eUjlJyitWAlsvDFNf9Yl4ioSJmMjNfmWXn7u41W7/qn/7gqxVpGhmjPQf4sxLk96iC8xpLOt0TJ7AliMZY6p5ZK5T27Q3QQw3zYBX4nfBvWheuXIXJLmDub4Y09YNxNp8QQTrYHP2y9ZN9a0kUwyvrTXRP7iXJTYHVrOuGOjTOhCYe1uR4NV3FuK+3B/z65v6jVo+rkf8N1zFjoq4z+aw8pM9Ryf7JkjgYaL86WyBRiVUlKF+FUK7p3eX5GC3xYrNnW9GHL7L4StO9STxmUyPf9DJzMrSEzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2gLYJGe+oSYFwglbaBrBqNvT65+/bWwiss+iP78E++8=; b=j3LeRGnHvPGPx+UqzsYyKlr0ogYd3qmCFU4/V5aE7IdSz8IDvuzgLC1yo1J0JXJCKBXn+lztdNmNIXBrUwbZHHIZrYVGjSY5XVYLWAAhiHfPL8vpRuyR/2SCLkZYuioBdzJODmZuV6xg1ta5JKWQDhPAzMI6yRTFUQzdcFrZ7W/dSpHcDcfSlaN1umdxJo7stN+Of+MGZWrE6+uIYf8vX1UA7ec7bDbfhYHkfcRU58Rm+mUzLIkgaLYyIr64WCaxBqafOfLBQvflLmfv+fBMQ7vi9U1Z+g1eatu09pQeCLb0d7x9rY9UhDnce3s346idf+jCjbFUsVBFfixWOP3kwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SJ2PR11MB8370.namprd11.prod.outlook.com (2603:10b6:a03:540::20) by LV2PR11MB472797.namprd11.prod.outlook.com (2603:10b6:404:302::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.11; Wed, 2 Dec 2026 04:56:34 +0000 Received: from SJ2PR11MB8370.namprd11.prod.outlook.com ([fe80::b6cf:ce77:3cdf:7cc]) by SJ2PR11MB8370.namprd11.prod.outlook.com ([fe80::b6cf:ce77:3cdf:7cc%7]) with mapi id 15.21.0688.009; Wed, 2 Dec 2026 04:56:32 +0000 Message-ID: <24e59242-0646-4092-8db6-11844a122c48@intel.com> Date: Tue, 1 Dec 2026 20:56:28 -0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 10/19] fs/resctrl: Add interface to display kernel mode status To: Babu Moger , , , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: From: Reinette Chatre Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MW4P222CA0026.NAMP222.PROD.OUTLOOK.COM (2603:10b6:303:114::31) To SJ2PR11MB8370.namprd11.prod.outlook.com (2603:10b6:a03:540::20) X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR11MB8370:EE_|LV2PR11MB472797:EE_ X-MS-Office365-Filtering-Correlation-Id: 86d81d42-7f56-482b-7210-08df5030a22b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|23010399003|1800799024|7416014|376014|10067099003|56012099006|261022075727099003|261026121527099003|261022105027099003|261028144727099003|261026140227099003|261021121427099003|261102123227099003|261009223027099003|22082099003|18002099003|8126099003|11063799006|5023799004|4143699003|6133799003|3023799007; X-Microsoft-Antispam-Message-Info: IYYhw9ChJ44d6OhCjNuIzOJwQWhxrFPaTk8JGFhaBys/HTu0rXFGHjT5ikrDbLGZpRkI2DsT8s4DlTotE8By7cO8IO6x7itvndVnmHh1oWB+3TOgBDYfTPdDxxk1iHmWePRIDMrUX6Gd63WIAevBnOdF4OJ1TtIFXpEmpcbuUu4Z74ovw3+hXGF1vtqcig2rUUWM6e7yyUrl4aBNxO5oqTj4fJ4FDinffLWT0B6lbwwqvZvgRKG0nVYM7WZ6GLZCTo+XoCASwcKJVZuzP9wAbb3sZtl65/ChZ8k79PEaP8BQL5ygv0HHbocn2YmHCqTGApp7DYPgl+2TixJj08uH6YBg4FKOmvhEztQHDcuA4osNs189q6cufToNZ42sXCx2HcmkLyn/vq7+mNmjunA3/YacFNitaqGFOhtBzRIpHcp87vD3UBrzll16XVbWCpScX52HSlSspYI1nQwveQuft+sbbqGgFXBpETAfyL3BREP/3QLFslavu4q6/PuXzQxdOnNu/nh77bMERd5kSjCSJ5HIAiGoMKeAObFOlCIvCpS0c6sv6lBGkrsLCZS1wmlvN3qSOuBOrggKigdGmf7hKnSfyXJXUozy9N1LzXbw3lPpC21RZ9QCngmF8KZkThhHvmUiDjwmtCKqbfJ6elBn/maU0rcNCEgMmgsO8/C+V/Q= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ2PR11MB8370.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(23010399003)(1800799024)(7416014)(376014)(10067099003)(56012099006)(261022075727099003)(261026121527099003)(261022105027099003)(261028144727099003)(261026140227099003)(261021121427099003)(261102123227099003)(261009223027099003)(22082099003)(18002099003)(8126099003)(11063799006)(5023799004)(4143699003)(6133799003)(3023799007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZWNMVUJDK3dZZG5RRUdFaCtQYTNkM2lIUEVUVzhuSmw4MHpnazhndjc1R0hy?= =?utf-8?B?Z0VUMjFzMnFoOTY4TTV4TlMxMEppZVVOTzNkYTVnVkdNaG0zU2xNZVg3VWY5?= =?utf-8?B?eWVENThwY2N2VHQwaUhUbE41Vng5ZGg4RkhrZHFnbVIzdmIwR2dRL0lDMGhE?= =?utf-8?B?UndES0JvTlQzeU9mdFpxcTI2NkhVZ2VCaUJLZTZKWEN3Wm5nUTE2ODNJT1gv?= =?utf-8?B?UkxjWktyeHRpVkZlTGY4WXpKNjRncGJQbVJjbHZpc2NEMUtma2FQb01tRHln?= =?utf-8?B?czhici9abUZDYzU3YTMyN0FMRjhUL21OSVJHTUVZb2NmMnhzeTRkRW1rMGFz?= =?utf-8?B?V01xeXhxc2JuaFFCU01Id2dJdCsxMldLMDFZNzN0YkZKdzlIRmQ3a3hHbkYy?= =?utf-8?B?WEl0TmhSUTJ3OXdQdDR5cHR1S0NaclBnNWZmZFMxVGl2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?B?NERMa3REWVk1bXdrS08vdHVydG9pUTJDUFdtYm42YWRLNW9jUjhOc21WVUtW?= =?utf-8?B?NVMzc2RLR3dONGZlL2tpbldTTG5RRHV5MjlwRXJSK0dOSUpLUWt1ZmIvNGdK?= =?utf-8?Q?khT7mF/gTHB1eVxc=3D?= X-Exchange-RoutingPolicyChecked: ozzfaof7lv3WTijW15UYKpJoWrTWwHJ8JODb5R5rtE1CKkIv1x4Sbw2g4d7lQ4Cch6IGHOyD05nmg7JujcTpGyk07AURjw9JyW9Flp/nlLosiaMBYV2yz0HOc1kKbZTIlo2siCyHQjtSGKcMGHKR5fuu0h1ewGoVlUf1lMJHvDu5lI6srrp7pSSyHJaDQXE7O2eOpvwY22uDwzHftPGURyZNSyzVgFVIXPpTqSdnkYUOZWwYtTZxkJKV3y4mG6iOOGvmhiga+ZiqLDHK97CotVty0zXO30RQKnL8TeArS4ElrgAQED24CDo6uxO6KtISw81ZWalImeveKL5qXnQJfg== X-MS-Exchange-CrossTenant-Network-Message-Id: 86d81d42-7f56-482b-7210-08df5030a22b X-MS-Exchange-CrossTenant-AuthSource: SJ2PR11MB8370.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2026 04:56:32.1291 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: asJcqWFqIBGoe5cBrIdGOZgt8HXFDHhZtlykNlFZ3VgkPZWU9hKV770eyqSqvF9nR3AC+2ffjavydsnG1visQItS9/5RijO/strkYEFs6Zw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR11MB472797 X-OriginatorOrg: intel.com Hi Babu, On 11/11/26 2:44 PM, Babu Moger wrote: > Kernel mode support allows the CPU's CLOSID and/or RMID association to > change when transitioning from user mode to kernel mode. This sentence appears here and is then copy&pasted into many commits that follow. First, please drop "association", I've noted it a few times so far and will stop doing so, please just be specific about referring to CLOSID and RMID. Second, please drop the "transitioning" term that uses some PLZA implementation language. This sentence can be something like: The RESCTRL_GLOBAL_ENABLE_PER_CPU kernel mode runs all kernel work on the CPUs where it is enabled with the CLOSID and/or RMID of a single resource group. In commits that follow the specific property the commit depends on can be highlighted instead of whole sentence repeatedly copy&pasted. For example, "x86,fs/resctrl: Add CPU hotplug support for kernel mode" can then start with: The RESCTRL_GLOBAL_ENABLE_PER_CPU kernel mode is enabled per CPU. CPUs that come online ... > > Add info/kernel_mode to expose the supported and active kernel modes > through the resctrl filesystem. Supported modes are listed one per line, needs imperative > with the active mode enclosed in square brackets. > > Signed-off-by: Babu Moger > --- ... > --- > Documentation/filesystems/resctrl.rst | 56 ++++++++++++++ > fs/resctrl/rdtgroup.c | 105 ++++++++++++++++++++++++++ > 2 files changed, 161 insertions(+) > > diff --git a/Documentation/filesystems/resctrl.rst b/Documentation/filesystems/resctrl.rst > index 2d672bbb69be..033d405338c0 100644 > --- a/Documentation/filesystems/resctrl.rst > +++ b/Documentation/filesystems/resctrl.rst > @@ -549,6 +549,62 @@ The top level of the "info" directory contains the following file(s): > # cat info/last_cmd_status > mask f7 has non-consecutive 1-bits > > +"kernel_mode": > + Lists the kernel modes supported by the system, one per line, with > + the active mode enclosed in square brackets. > + > + A task running on a CPU is associated with an allocation and > + monitoring ID pair (ctrl_hw_id, mon_hw_id), which determines the > + resource allocation and monitoring applied to that task. Kernel Should this not rather be "A task is associated with a resource group, which determines ..."? > + modes allow the CPU's allocation and/or monitoring association to > + change during the transition from user mode to kernel mode. > + > + Possible kernel modes are: > + > + "inherit_user": > + Default mode at boot. Kernel work uses the allocation > + and monitoring of the user task on whose behalf it runs. > + > + "global_enable_per_cpu": > + Kernel work uses the allocation and/or monitoring of a backing > + CTRL_MON or MON group. The mode can be enabled or disabled > + per-CPU. The line contains group= and whichever of ctrl= and > + mon= the platform supports:: Final sentence above does not add more than example below. How about The mode and its parameters are shown as:: > + > + global_enable_per_cpu:ctrl=;mon=;group=// > + > + "ctrl": > + "assign" if kernel work uses the resource group's > + allocation, or "inherit" if it uses the user task's allocation -> allocations (a resource group contains multiple allocations across several resources) > + allocation. Present only on systems that support allocation. allocation -> allocations (just for the first instance, the "support allocation" remains singular.) > + > + "mon": > + "assign" if kernel work uses the resource group's monitoring, > + or "inherit" if it uses the user task's monitoring. Present > + only on systems that support monitoring. > + > + "group": > + Path of the backing resource group, relative to the resctrl > + mount point. > + > + A MON group is shown as "//". > + > + A CTRL_MON group is shown as "//" when "mon=assign". > + > + When "mon=inherit", or monitoring is unsupported, a CTRL_MON group > + is shown as "/". > + > + When the mode is not active, the output lists the supported parameters > + and their default values, which are used if the mode is activated > + without new values. > + > + Example of a system that supports allocation and monitoring, with default mode drop default? Or perhaps better to match terminology with "with inherit_user mode active"? > + set to inherit_user:: > + > + # cat info/kernel_mode > + [inherit_user] > + global_enable_per_cpu:ctrl=assign;mon=assign;group=// > + > Resource alloc and monitor groups > ================================= > > diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c > index 28bd4c4d98f2..afbe0f94940a 100644 > --- a/fs/resctrl/rdtgroup.c > +++ b/fs/resctrl/rdtgroup.c > @@ -998,6 +998,104 @@ static int rdt_last_cmd_status_show(struct kernfs_open_file *of, > return 0; > } > > +/* Names used in info/kernel_mode; indexed by enum resctrl_kernel_mode */ > +static const char * const resctrl_kmode_str[] = { > + [RESCTRL_INHERIT_USER] = "inherit_user", > + [RESCTRL_GLOBAL_ENABLE_PER_CPU] = "global_enable_per_cpu" > +}; > + > +static_assert(ARRAY_SIZE(resctrl_kmode_str) == RESCTRL_NUM_KERNEL_MODES); > + > +static const char *resctrl_kmode_state_str(enum kmode_state state) > +{ > + return state == KMODE_ASSIGN ? "assign" : "inherit"; > +} > + > +static void resctrl_kmode_group_path(struct rdtgroup *rdtgrp, > + const char **ctrl, const char **mon) > +{ > + *ctrl = ""; Above looks unnecessary. > + *mon = ""; Above can just move to the RDTCTRL_GROUP branch? > + > + if (rdtgrp->type == RDTMON_GROUP) { > + *ctrl = rdt_kn_name(rdtgrp->mon.parent->kn); > + *mon = rdt_kn_name(rdtgrp->kn); > + } else { > + *ctrl = rdt_kn_name(rdtgrp->kn); > + } > +} > + > +/** > + * resctrl_kernel_mode_show() - Display supported and active kernel modes > + * @of: kernfs open file > + * @seq: output seq_file > + * @v: unused > + * > + * Lists one line per mode and brackets the active mode. inherit_user > + * has no parameters. global_enable_per_cpu prints ctrl= only when > + * allocation is supported and mon= only when monitoring is supported, > + * then group=. The MON group is included in group= only when monitoring > + * is supported and mon is assign. > + * > + * Return: 0 on success, or -ENOENT on error. > + */ > +static int resctrl_kernel_mode_show(struct kernfs_open_file *of, > + struct seq_file *seq, void *v) > +{ > + const char *ctrl_grp, *mon_grp; > + enum resctrl_kernel_mode mode; > + bool active; > + char sep; > + > + if (!info_kn_lock(of->kn)) > + return -ENOENT; > + > + for (mode = 0; mode < RESCTRL_NUM_KERNEL_MODES; mode++) { > + if (!test_bit(mode, resctrl_kmode.supported)) > + continue; > + > + active = resctrl_kmode.active == mode; > + > + seq_printf(seq, active ? "[%s" : "%s", resctrl_kmode_str[mode]); > + > + if (mode == RESCTRL_GLOBAL_ENABLE_PER_CPU) { > + ctrl_grp = ""; > + mon_grp = ""; > + if (active) { > + if (resctrl_kmode.rdtgrp) > + resctrl_kmode_group_path(resctrl_kmode.rdtgrp, > + &ctrl_grp, &mon_grp); > + else > + pr_warn("%s active without a resource group\n", > + resctrl_kmode_str[mode]); > + } Above should be simplified if resctrl_kmode_cfg::rdtgrp is initialized to the default resource group. > + > + sep = ':'; > + if (resctrl_arch_alloc_capable()) { > + seq_printf(seq, "%cctrl=%s", sep, > + resctrl_kmode_state_str(resctrl_kmode.ctrl)); > + sep = ';'; > + } > + if (resctrl_arch_mon_capable()) { > + seq_printf(seq, "%cmon=%s", sep, > + resctrl_kmode_state_str(resctrl_kmode.mon)); > + sep = ';'; > + } > + if (resctrl_arch_mon_capable() && > + resctrl_kmode.mon != KMODE_INHERIT) > + seq_printf(seq, "%cgroup=%s/%s/", sep, ctrl_grp, mon_grp); > + else > + seq_printf(seq, "%cgroup=%s/", sep, ctrl_grp); Above looks unnecessarily complicated. Why is the "sep" needed? Could this not be simplified to: seq_putc(seq, ':'); if (resctrl_arch_alloc_capable()) seq_printf(seq, "ctrl=%s;", resctrl_kmode_state_str(resctrl_kmode.ctrl)); if (resctrl_arch_mon_capable()) seq_printf(seq, "mon=%s;", resctrl_kmode_state_str(resctrl_kmode.mon)); seq_printf(seq, "group=%s/", ctrl_grp); if (resctrl_arch_mon_capable() && resctrl_kmode.mon == KMODE_ASSIGN) seq_printf(seq, "%s/", mon_grp); > + } > + > + seq_puts(seq, active ? "]\n" : "\n"); > + } > + > + info_kn_unlock(of->kn); > + > + return 0; > +} > + > void *rdt_kn_parent_priv(struct kernfs_node *kn) > { > /* > @@ -1983,6 +2081,13 @@ static struct rftype res_common_files[] = { > .seq_show = rdt_last_cmd_status_show, > .fflags = RFTYPE_TOP_INFO, > }, > + { > + .name = "kernel_mode", > + .mode = 0444, > + .kf_ops = &rdtgroup_kf_single_ops, > + .seq_show = resctrl_kernel_mode_show, > + .fflags = RFTYPE_TOP_INFO, > + }, > { > .name = "mbm_assign_on_mkdir", > .mode = 0644, Reinette