From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3B3A225416 for ; Fri, 27 Mar 2026 16:41:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.21 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774629707; cv=fail; b=FmvejR9DyPqY24KfRAWEy/oFByAu67iMnMDcjtBCK9jIq8jw41zyk0bx4cdeUHAa0L/0J7SVuc21O2WRNyQege0w0OulIdaku80YKKxKYXkELU6s+MAJefG9KWd5PwJA1sh31/LJ4EUn66YB2Glrf+9NrMoCyR7te8oe+p04jSw= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774629707; c=relaxed/simple; bh=ffEpvb0bSLmK4k5TWMW/7uB2wGekaFv4bc7qtKj2pCk=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=k4FOw7CtP72tSgeEcEEQEeamOFuJucB6e0e8WoZualLlm+Vm1slo1Cx+Ugt5KGUWpPpdoPM4SqAkhu7tZy0PryP9Rj0PQZrf5286HmueWTKfVJwgxdOSXurXZWSF6IKm16ZkVf+2ji5gnWTaE/YPb1n2sDEsxTHA9kpuet8uEXY= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=FSEYIEhl; arc=fail smtp.client-ip=198.175.65.21 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.b="FSEYIEhl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774629706; x=1806165706; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=ffEpvb0bSLmK4k5TWMW/7uB2wGekaFv4bc7qtKj2pCk=; b=FSEYIEhlKr0XYn+WBJr8w59hRCXC8Gj9WVkxBIW5rkc7vY4pABzCOLLl LZ8Al2AOCGDuNAuAhHeSViDdiGL7zu4ff5E7ZR0LcItjds35o2ZsR3SYk uz/ydkN2ys980u22FjPoi1pFRwnW8zyHdNiBlHvoNabqjN7CMQJf+YDTn v6s5n4rp34hZUqRuvZUfrAjtz/trJhs8jKVceIyV10Wbz9qIWXd2LcwWR cajFvd9yGpTIaJRO3/DiXMcuLDRmJzs+QTNtLoYSNISN7KwASDR7+fXVa cThD6jEgDjI0gc9WIv8Nxb2DzdjmcykKtLyN601mwnSD4kE029lHCFLT8 A==; X-CSE-ConnectionGUID: NeZqjkp4QqiTmXVkK1zutw== X-CSE-MsgGUID: rpS7MTxCQM6VMuHWgwEpvg== X-IronPort-AV: E=McAfee;i="6800,10657,11742"; a="75587034" X-IronPort-AV: E=Sophos;i="6.23,144,1770624000"; d="scan'208";a="75587034" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2026 09:41:46 -0700 X-CSE-ConnectionGUID: EA6cdnJZTpmKNYH58gsGkA== X-CSE-MsgGUID: 74oJP45XRzyqmqjkUDfZgg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,144,1770624000"; d="scan'208";a="263312335" Received: from orsmsx903.amr.corp.intel.com ([10.22.229.25]) by orviesa001.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2026 09:41:47 -0700 Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by ORSMSX903.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.37; Fri, 27 Mar 2026 09:41:45 -0700 Received: from ORSEDG903.ED.cps.intel.com (10.7.248.13) by ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.37 via Frontend Transport; Fri, 27 Mar 2026 09:41:45 -0700 Received: from BL0PR03CU003.outbound.protection.outlook.com (52.101.53.2) by edgegateway.intel.com (134.134.137.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.37; Fri, 27 Mar 2026 09:41:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bx4W4IRGzNHvsFtaAIlY1Z2G6FajYvd+rsuQw3Rc8cbmgkfru0fiGaqDDQ2sfFVV0uNL6J7OgSz8KiJw2/nDlOKTuWO/rsAZjB5oRDwe27mAYvKm4jQwO99o1ycSEhXtvvKiQl8XnGuU+eYKS8XXOg6tE5u/y7LSRpRG++xaXNz0yvpflVTY7A6goqTt/gMt2kITTvPpIuQdV2tE7FxoFcDKxMwQYNL6RRr0JO6AaO712mZWm5bAIObJO84Ji4FfdOAIw3e+DA79HM36FyBQw/HXjST0wH43pbkyMZOdAIN+EFBTRfZp/jAzDCHDPGdMBbaEIPDEOfC/kP7Q4xQiVw== 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=51HwdTY5qkH1LuTnZKQHa8maQX8bLiocMoFqvN6T3es=; b=iHd3R2xShMIzpldqbdjlZiAOaJiQYWbs0qJgvqLk5sjh7yYJf0x1rV4CXJLDd9X4DTVNiI34Ev7dEDNCPaTE5MNlNKkvT/qsflUuZQS3+hhjLIJWE42ulwNlBYymsJDHzHeOLcA9TB/q6a9xetjgEl9Qj+lUWBUWPC34qgqoJNqMJYsC38TpT5g2EBOHAwTb+MewIiBSl76fl0dJoaBwjH7ZqUSg6hZQuFSZQEX32cG7ES5of1gT569OsZzT9CL1pgNfxgc5jWIQURMH1pFmQl2D2d8/D2b+pRWqH+44KH6WSP9jbL+3VoH9diUtPV90oNaV3F2fuIQ+Ry4MwufmFA== 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: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SJ2PR11MB7573.namprd11.prod.outlook.com (2603:10b6:a03:4d2::10) by SAWPR11MB9757.namprd11.prod.outlook.com (2603:10b6:806:4cb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.10; Fri, 27 Mar 2026 16:41:43 +0000 Received: from SJ2PR11MB7573.namprd11.prod.outlook.com ([fe80::bfe:4ce1:556:4a9d]) by SJ2PR11MB7573.namprd11.prod.outlook.com ([fe80::bfe:4ce1:556:4a9d%5]) with mapi id 15.20.9769.006; Fri, 27 Mar 2026 16:41:42 +0000 Message-ID: <903ee623-1935-4258-8a1a-adcfd626c17c@intel.com> Date: Fri, 27 Mar 2026 09:40:43 -0700 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 7/7] fs/resctrl: Document tasks file behaviour for task id 0 and idle tasks To: Ben Horgan , CC: , , , , , , , , , , , References: <20260326172551.1553871-1-ben.horgan@arm.com> <20260326172551.1553871-8-ben.horgan@arm.com> From: Reinette Chatre Content-Language: en-US In-Reply-To: <20260326172551.1553871-8-ben.horgan@arm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MW4PR03CA0210.namprd03.prod.outlook.com (2603:10b6:303:b8::35) To SJ2PR11MB7573.namprd11.prod.outlook.com (2603:10b6:a03:4d2::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR11MB7573:EE_|SAWPR11MB9757:EE_ X-MS-Office365-Filtering-Correlation-Id: 1aebcb3c-b94b-4cc1-ff1a-08de8c1fb9e3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|18002099003|56012099003|22082099003; X-Microsoft-Antispam-Message-Info: GcpgMw1jOHkVe+G0jVQnlgsf2cN6o4vTXPY5vpWhkzqRqS2Z5QLX71SO13cYhTuYjCenvWbYhlRMdaLUnWzwkau90hDHHrlRKVu5JoAE6nCqWmOhr3FZztD6KTs9vK/+Acbd2Qo03+gG2ini1u85aEa8Y7/n+cmOIbMu3lJy36r4nei23VPOfTsJDaus028gxW5l1gjLnLqXMIpzXqYE7jcVZaVdqOK+2EbW9CYIC3oL+QFu1Xy3Z3LynH5Tn+5We4aA5bfCAiw1uoXfg03VTnHNnPVpzsRvtIhSlKouNwh1zKwMIW6jQPHUmGkG4laTDyLUw3E9dn9QLU+8LHpzK+hp1wkoinh91/KZFgiwrM1NR84SeLYZB3QthHwXd8qzy2qGeLB5A/6OpIWxDX8tKJEfnWwJaYh6I/+rZwxIy8z183qi74wu+OMDWzR9QjHWPNiN1lWt+W52/3ht4SzR/CUr+0uVLM1jF/3Ie7l55mP98hv27NCko6MnYs0MGP/XyUGa+bjqcUj/ezesmfNOPsJthiT0rzocNdSc9CmXR9wWMTYMrvplzftNTB8XuJD+c0k/ablshjW4VxxtbkpU8LM5BwvsXT8wKZxsDxh5uvd5U8l8Q9LNQqZ46EJ52cpr/xClCVHZRiUOM9iw0ZtKOcHc5LUvYEar3dygLlaaSXItolOBZ1D/zwFCv1Ye0W+HYPkAk2xZY0f3DpwC8i0t6T5FrIYDIo7yOrLnAU7lFTU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ2PR11MB7573.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(18002099003)(56012099003)(22082099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?b0NnVmZTazExOHI3Smd1Y09lc0JWQkJGQ05CTGlPOGVYQlRwcmhRQXJoanVh?= =?utf-8?B?ZkJRZmxJYTJxQjF0MDhBY29ZclZvMFNtL3hMbkQ4WWNPald3SHo3SUMwa3Rh?= =?utf-8?B?UjE3eDRZRk82dk9YR1BTVjRJdmFsYUwrNVhtQVRhN1NZWHA0aU10NEtGc1lO?= =?utf-8?B?NENCc1ltQmo5NTNNSkZtZUNRZDhjRjVVYXhITzdTalFBWVRaRGVrOHhReDNE?= =?utf-8?B?Z1d3cExtRENXMUhEQ3VDTFd5ZlpwK1BXUHg1THJ5djlpSVkzRzlTeVJJVVAx?= =?utf-8?B?YkhmY3NLUzU0UTRVZWtVWjN6emtvMzJORWxwK09tU2JNQmpaQXcvTVBTS3JM?= =?utf-8?B?R1VWM0ZGSDBuUEN4Zmk2eFBqQmdkRVE1VnZJTEcvSWNLd0VORURTL09Icnl3?= =?utf-8?B?MUwwdzlHMXBMaVk1RFlIeGhkZDB5UVdVVFdMTHllY05PSlIvcDZwNlY0Z0Vh?= =?utf-8?B?ZWJIWnh4b3RkcEhnRnlWYVUxblFqbUMwRTdXOENUNlpxbDV6cm5vaUkybE15?= =?utf-8?B?cEpKUlltUUNYVmcrYjV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3RDeWNBWnR2?= =?utf-8?Q?Vog5jloMYWjbz7rc=3D?= X-Exchange-RoutingPolicyChecked: vcg5kmjTJvZE/HaumOaOgu32IZDd+VqOge1Y0U1oWW85BTpmCeatdjATQ9NpCL9vOGMUJyYrq/ETJ2geRvYEDmAaccwgSTNJSsy8RETU2Ow7cKn7r/IDgVeXTxQ5oLX3HY/NDa1xbWLeyxo64GleaPINGYmTe7Y1VeSJxZj77H3rQpeXhlpMIP2gD32VFH5D6SE4w4SHVdQAdBQ3XaXsZWl5053eYnXwrxx438emj6OSwnzmwliX/ZfyxSZAn95IQ13HkV8EDMKQ0dUjYNEEmw2o47aQ16DAMAbTzeKzzqT/Zs0sriICozgT0wUwkafdzF1kV9eyJSjlMw9ELBRf7g== X-MS-Exchange-CrossTenant-Network-Message-Id: 1aebcb3c-b94b-4cc1-ff1a-08de8c1fb9e3 X-MS-Exchange-CrossTenant-AuthSource: SJ2PR11MB7573.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2026 16:41:42.4799 (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: OHXhIXd8z9W/aIkAKlbcMqIVKOjq97s9R0BblHQNG8UwyJ/MqVOItjq7muaOj7gmZR+N2tHfgxBUJgLt1InL5uEflMprl5wSzSDNfxb443M= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SAWPR11MB9757 X-OriginatorOrg: intel.com Hi Ben, On 3/26/26 10:25 AM, Ben Horgan wrote: > When 0 is written to the tasks file it is interpreted as the current task > in rdtgroup_move_task(). The task_struct for each CPUs idle task has pid "each CPUs" -> "each CPU's" "pid" could be PID or task_struct::pid to help make clear what it refers to. > set to 0 and, on x86, the closid to RESCTRL_RESERVED_CLOSID and rmid to It is not clear if you refer to the actual task_struct field, for example task_struct::closid, or what it represents, for example CLOSID. > RESCTRL_RESERVED_RMID. Equivalently, on MPAM platforms, > thread_info->mpam_partid_pmg is encoded with PARTID and PMG set to thread_info->mpam_partid_pmg to thread_info::mpam_partid_pmg to be consistent if making an earlier change. > RESCTRL_RESERVED_CLOSID and RESCTRL_RESERVED_RMID, respectively. As there > is no interface to change these from the default, the resctrl configuration > for the idle tasks is fixed and they always behave equivalently to a task > in the default tasks file and so take their configuration from the cpus "cpus" -> "cpus/cpus_list" > files. > > On read of the tasks file, show_rdt_tasks() filters out any 0 pid. Hence, "pid" -> "PID" > a task id of 0 is never shown in the tasks file and the idle tasks are > not represented either. > > Document the user visible behaviour. > > Signed-off-by: Ben Horgan > --- > I have confirmed this experimentally on an MPAM platform. > --- > Documentation/filesystems/resctrl.rst | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/filesystems/resctrl.rst b/Documentation/filesystems/resctrl.rst > index 68cada238844..3ec6b3b1b603 100644 > --- a/Documentation/filesystems/resctrl.rst > +++ b/Documentation/filesystems/resctrl.rst > @@ -568,6 +568,11 @@ All groups contain the following files: > then the task must already belong to the CTRL_MON parent of this > group. The task is removed from any previous MON group. > > + When writing to this file, a task id of 0 is interpreted as the > + task id of the currently running task. On reading the file, a task > + id of 0 will never be shown and there is no representation of the > + idle tasks. Instead, a CPU's idle task is always considered as a > + member of the group owning the CPU. > This is a valuable addition. Thank you very much for adding it. > "cpus": > Reading this file shows a bitmask of the logical CPUs owned by Reinette