From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 1EFE94F7971 for ; Tue, 3 Mar 2026 17:00:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.15 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772557208; cv=fail; b=q3Va9FSTLERscSICoo1FmOSxc0qjLSeqdjt2DuU11MT1qCRqp1rWp/CbInkAbO5Z4dMs5cCqUroE6/EQIYX/QbWXLINEyu4bFCEkjxhXS1HzDo6caWjOuk6E5kVCmQtvtRegqFgYXa3erFMe3AIjaBVNnQUB2k8DCFxGXGmWMUg= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772557208; c=relaxed/simple; bh=JRRVoltlfoivfWSeiizHL78ugsx7BvsHFq2cRTnZqpI=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=SI4uQPcWmePgMZ+VVQCkCUaQ1jOozGdaisfOTlMi5u7ajrWoQ7DaZaQgy5P7c1oC+kEEpE9EiZwBv/4TuYe2/HSaWixehtAuew8dYX96vdsdAqiyjNGkpnIbm9R6A+80Z9QaRGim+ZyxQbrqt7DLjW7oi874ZiCtX0/KKiGBnzE= 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=P34EpOsI; arc=fail smtp.client-ip=192.198.163.15 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="P34EpOsI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1772557205; x=1804093205; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=JRRVoltlfoivfWSeiizHL78ugsx7BvsHFq2cRTnZqpI=; b=P34EpOsIvM85lsoWcNK2hr4Nwo0rcnIcZ2jBx+eHMkLaIryn4/yyvfDr uzmPaiIc6WRhtP+hCGYC4e4OweKknB9tU5DDePHugXk5IawNfl6HYccvX sHFBN/WOM9TMGiEAOiWrElczQyMGrFEtIguuy4dvVN9Xna2RrD3W3dX6q Pa3MaOxZAxfjnRpr1GqqQB/YD5ern5pVtHMEmEjY6gCeMXj+GwRb2/bfQ XoLYXUh2MYghJsPiYcGEe5OK1DsYoyH+Ae4w6zwVLXmh0aQ8askUZQb6u 1FoYuM7ftAtTw1my7h7UZQwJ1crh/5PMaKCRREpVPm8ZGM/9VREEX2fLE Q==; X-CSE-ConnectionGUID: IpGiXYBdTtSv6WRqnEsVCQ== X-CSE-MsgGUID: G1wmd+zsTEiR7AYZ3HrQwg== X-IronPort-AV: E=McAfee;i="6800,10657,11718"; a="73726942" X-IronPort-AV: E=Sophos;i="6.21,322,1763452800"; d="scan'208";a="73726942" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2026 09:00:05 -0800 X-CSE-ConnectionGUID: bOPlCwS1RCi1tJ0P9P6Onw== X-CSE-MsgGUID: 2bczFSKnRaSckYQ75G+gIg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,322,1763452800"; d="scan'208";a="222716565" Received: from orsmsx903.amr.corp.intel.com ([10.22.229.25]) by fmviesa005.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2026 09:00:04 -0800 Received: from ORSMSX903.amr.corp.intel.com (10.22.229.25) 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; Tue, 3 Mar 2026 09:00:03 -0800 Received: from ORSEDG902.ED.cps.intel.com (10.7.248.12) 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 via Frontend Transport; Tue, 3 Mar 2026 09:00:03 -0800 Received: from BN8PR05CU002.outbound.protection.outlook.com (52.101.57.67) by edgegateway.intel.com (134.134.137.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.37; Tue, 3 Mar 2026 09:00:03 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VHn330wmaYk3bNp1VY+wHs5NXvW0yX0R1kkhC6iL6HDuIFp2Z8fx4Zru7GGUBUq1YQKL43i5GDCVRiHOijtMwKB6KFsuWqX6lscTLUM923HNaRuaDxmWgvsyZIXOjV1NnyRO9aCTasykaZkk99b4fHNbT7IGJ0ICurhq+HKRIcFuWlAX6KA+bRnFxezc8iGGQiBiVNe0Ao0y09Uzy/sGU8SSK9NfQA4FI0S4Rlzlqy52RLF8ANl1RpIJVhR335V2HZfkaFk0xjfNokKCUdu1rif7ON+huHNizSqETEa7hcQn/LCopjUINMdzYib14P+UeD4AFn10j0z2NfYOg5L/lA== 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=dAQjgsRz9n0wkmnCpcoyFX0+vlP0/m1QT4ZapLvOIxI=; b=oni1DI7HIpQ/dZV/enYdR7UJpBSbw/YLaMP90i2HleZUH/5szkxZVm7lSbiFiUf2j4RpupAAp+B7bU+25RVvRKfETi7k/PdgmjScfD1riNcj17D9JGKHiG6ctfQbHyW9axAKvXrwI7fCDjEtQtH5lOnpAsrmjv5DJA8WhZPUKDTRWa+tZQXOeIPXRy01lPMRzSFKpDEVLjMK4WMPS7IOHKMyphttp/yvkSyCkrFCVg5CTtFOMYYRtX1lcnJtYcj5SlRPko7VaxDBGm22r2NGxBULADxxP5r2bOFATl6s1hro/z4JOWIkvkXMNrxR87zP5w4Rc+WSuLEBHTCJzX8VhA== 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 DS7PR11MB6037.namprd11.prod.outlook.com (2603:10b6:8:74::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.22; Tue, 3 Mar 2026 16:59:55 +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.9654.022; Tue, 3 Mar 2026 16:59:55 +0000 Message-ID: <54dc8764-3c42-4806-bc7f-bdf09a2ab500@intel.com> Date: Tue, 3 Mar 2026 08:58:45 -0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4] fs/resctrl: Add CONFIG_RESCTRL_ASSIGN_FIXED Kconfig entry To: Ben Horgan CC: Borislav Petkov , , , , , References: <20260204161952.685921-1-ben.horgan@arm.com> <20260301104918.GCaaQZrlomC0Bw-wM3@fat_crate.local> <9b2c1318-3f59-4d21-8b15-922bdac8114c@arm.com> <486d59a6-4c8b-49e3-a1d1-673c9224bce2@intel.com> From: Reinette Chatre Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MW4P220CA0020.NAMP220.PROD.OUTLOOK.COM (2603:10b6:303:115::25) 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_|DS7PR11MB6037:EE_ X-MS-Office365-Filtering-Correlation-Id: 0968c524-e017-452d-ce4b-08de79464b6b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7053199007; X-Microsoft-Antispam-Message-Info: mBwxECwK11Jab5VYcFGtreaSAiy2Yruce6fdZt6ixFE/vHS6bXEkbKwY4ID4U/c79zMxhyaxJzPWltKmryc/LS59obGDpdolT81Kr4nm5TV2Ll84Sm20KAYfwavGve4DTTKbroQqcm04jHTBolRGgJWIhzlsuUyAlLdEUi7Ji64AIrMOYgxMAHtcdbokLR/B0FRgPvRnmj0tiJBHLR5KovtDPj9EEvBRoT3X4dXUz8j3uOrVt5q4WniX8GoWZQeb7VByyQ/lElZTATQxUD/8XJp2a2WAWJa1riq2qVGt5KW8EGQhbQEnQEndHjHqr+oZJciHixjkNY93sw+l2u8QinotnPTxt5YVM1qb8YwozVhKD5Kw/6uz2mcYlmIHWFIk63tsEdolmjv0oVJmyQGCzA8oLN2PkY8Mfuaz3oHuLpVRH4xKq9sCCeFbNGnXQHr6KGvqvfRYa5mPvP2LodSEcVXR0Gdq3c4Wh52yB1EOHSYfk/Q6mFWbPa1PPF0Y8zJLMe40NVwkUtRpABMgIfVJpcig0KCXPJgOHbM4vXzrGPDR/nEH4sgRoOOtl79ot2cFTyUKE4YnOLLZefX7Nk8g38S4WGdRcWTZwKm8B2FnWNx8D6IGOjHKfxjcgjTfo7hJ8VNLRa78gz4ATCD2FDngEOr08iHqPlvD6M1rWqo0kBHrduVr4woMn4WmevrtNqx50gcigZsn6ydc1fczbKcVpfwFrpwDAdSHtE9t4yg6KcQ= 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)(366016)(1800799024)(376014)(7053199007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YXpHQUY3UGdlWWVFVVhtKzFJemlSOXhKRGZibkdIK05Jc2dSTXVjRkUwV1B6?= =?utf-8?B?c3dGOTUzcnEzWXdINndHS2V2eUU0bmlaaitVWjZ0S0d6TERYRWM1ckV4ZmVk?= =?utf-8?B?ZjhSTzNJNU9ma05NYjBOZEdrdEoyUXBHRUtLMUt1aDZidSt6ZXJiK2swS1RM?= =?utf-8?B?a0xDKzdmOWJOM1BEeUUzdTdSV0plLzk5YVUySnNBRllKMGw2RGxaWGM2aFlu?= =?utf-8?B?b201cXVPWk9jSVVNVnlYSE53UUY1aGhMUlpBbVptUFEvNnlNM3RsM0txL09w?= =?utf-8?B?VldoNDBDM04zdVN4bU1oQUV1Q2thd0hRR2JWZDYwaCtjekRBaHdGRFpObmcx?= =?utf-8?B?c3NsYlBObFhCNHhHdEVZa21iZlRPcldBODJveUs3eU5SQzVsNTRnVzNUR1F2?= =?utf-8?B?VGQrR1p0NEs5ZXVZU3QxOFYrNFhHa2ExRHQ2Y3BWODFSUFZsTHZZZDhlUktP?= =?utf-8?B?TzBwT1BERDhkTGVJT0cxN0Njb3pMZkVNYy84UU03L3pmb0dwNTFIUmJ6OFpX?= =?utf-8?B?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jbFRnbTdmaVJzRjJmaHloSkVy?= =?utf-8?Q?UTVNQIUFLdFOVo8c=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 0968c524-e017-452d-ce4b-08de79464b6b X-MS-Exchange-CrossTenant-AuthSource: SJ2PR11MB7573.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2026 16:59:55.5442 (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: U2XcJ8AGEFNk633wBMdOJ+R6fkuwmbA409BXXfwjx9ja0kAQK3BeAwKwGYzMYT0mfAKye15vGXsJxvg0fFgzCM3z1B7nk+QQCB0vm+RmASY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6037 X-OriginatorOrg: intel.com Hi Ben, On 3/3/26 6:24 AM, Ben Horgan wrote: > Hi Reinette, > > On Mon, Mar 02, 2026 at 03:32:39PM -0800, Reinette Chatre wrote: >> Hi Ben, >> >> On 3/2/26 2:02 AM, Ben Horgan wrote: >>> Hi Boris, >>> >>> On 3/1/26 10:49, Borislav Petkov wrote: >>>> On Wed, Feb 04, 2026 at 04:19:52PM +0000, Ben Horgan wrote: >>>>> diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c >>>>> index 572a9925bd6c..4e9f55ee3267 100644 >>>>> --- a/fs/resctrl/monitor.c >>>>> +++ b/fs/resctrl/monitor.c >>>>> @@ -1451,6 +1451,12 @@ ssize_t resctrl_mbm_assign_mode_write(struct kernfs_open_file *of, char *buf, >>>>> } >>>>> >>>>> if (enable != resctrl_arch_mbm_cntr_assign_enabled(r)) { >>>>> + if (IS_ENABLED(CONFIG_RESCTRL_ASSIGN_FIXED)) { >>>> >>>> Does it need to be a Kconfig entry or you can figure out programatically from >>>> the architecture that that is the case and avoid yet another CONFIG_ knob? >>>> >>>> From reading this, I'm thinking >>>> >>>> if (IS ARM64) { >>>> >>>> should do or...? >>> >>> Yes, we don't necessarily need the Kconfig and we don't necessarily need this condition at all in >>> resctrl_mbm_assign_mode_write(), we do need the existing one in resctrl_mbm_assign_mode_show() though. >> >> It is not obvious to me why the one in resctrl_mbm_assign_mode_show() is required if >> a new arch helper could suffice in other parts > > I think a new arch helper could cover both. > >> >>> >>> The Kconfig was effectively added in: >>> >>> commit 3b497c3f4f04 ("fs/resctrl: Introduce the interface to display monitoring modes") >>> >>> and I was just filling in the missing piece. Most arch specific things in resctrl seem >>> to be dealt with using resctrl_arch_* hooks. Would it be preferable to create a new one of these? >> >> It looks to me as though this patch fits in with the other series you posted at >> https://lore.kernel.org/lkml/20260225201905.3568624-1-ben.horgan@arm.com/ >> >> When looking at this patch together with the other series there may indeed be an arch >> helper that can replace CONFIG_RESCTRL_ASSIGN_FIXED but as I mentioned in that series >> the MPAM capabilities and strategies for resctrl to support them are not clear to me >> at this time. > > If you like, I can drop this patch and tag a resctrl_arch_ hook based hook > version on to that series when I respin. Do you prefer a new hook, > resctrl_arch_mbm_cntr_assign_fixed(), or using/abusing the error return of > resctrl_arch_mbm_assign_set()? I am now focusing on understanding the MPAM requirements around assignable counters that are being discussed as part of the other series you sent recently. Without that insight it is difficult to have preference for an interface. I do think it will be helpful to keep this work together in one series. >>> It could be resctrl_arch_mbm_cntr_assign_fixed() although we seem to be getting too many >>> of these too. Perhaps we could extend the meaning of another hook, resctrl_arch_mbm_assign_set() could >> >> Could you please elaborate which category of helper is getting to be too many? We can surely >> explore improvements. > > Nothing major or anything that necessarily needs to change. Just that for each > new feature we get a few new resctrl_arch_* and they all need to be updated in > the MPAM driver even if the feature isn't used. I see. These helpers evolved as part of the arch fs split. One option may be to have an arch register callbacks instead that resctrl fs could test for existence and not require every arch to have a stub. Reinette