From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 434D33CAA5E for ; Thu, 4 Jun 2026 10:02:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780567358; cv=none; b=qAQ+yemigt0CGC+rm/akDZIB987ECUCjgRgYIdk/VoOdF50xaGihK8/gcKC6itdffIyw2grFAPeE+jeVo0waTtTtJV2pRLTMKhZuFTULmubWbnevxP/2SGAM05Z0Yoswb/SVcoD1sHYjp9DvDcpEnYicCB+QziNv/VPvosgFthA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780567358; c=relaxed/simple; bh=v02tvjY4FVhpUi2Qpz5BXkcAaQoHe3n4xAcU3FPDH5g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DFzhBUXnVhRzG+Sq3+MQB3Wu6xm9Kb34Bc6CfvSCnP6aFPfQJ1QJEND1CgdUJMHRuCbuUPnH63fyxJKU25LJLXA/sbCmgl4D80IYpRiYbEBiniwE8ZH6wlSghW+mKtxdCfacO4V100GlxfQ41q8yx85Xgwcau3rWt4mj3DTChdU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=JOWBtZvM; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="JOWBtZvM" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9EF6A32AB; Thu, 4 Jun 2026 03:02:30 -0700 (PDT) Received: from [10.1.196.46] (e134344.arm.com [10.1.196.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 54DA53F86F; Thu, 4 Jun 2026 03:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1780567355; bh=v02tvjY4FVhpUi2Qpz5BXkcAaQoHe3n4xAcU3FPDH5g=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=JOWBtZvMqdI3gONbz8+S/20MCgJ44c+ZmYZpQcGU6V2/vdj1T91J3Lso4WuzgTH50 i8QyxoRa6b1hF4ndQK+RV9XBIEZsTTfaizpYxgBqCuDQ9MfiWVBzuNpCesTFJg4ZRe AmdjuwNrsCsdDSiuOST51MyHBYcxEHuSR5yEgJKM= Message-ID: <4aac9c4c-2ec6-4b6e-b204-8944f61c099c@arm.com> Date: Thu, 4 Jun 2026 11:02:31 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Thunderbird Daily Subject: Re: [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept To: "Luck, Tony" , Reinette Chatre Cc: James Morse , Dave Martin , Babu Moger , Drew Fustini , Fenghua Yu , Chen Yu , Borislav Petkov , Thomas Gleixner , Dave Hansen , Peter Newman , "x86@kernel.org" , "linux-kernel@vger.kernel.org" References: Content-Language: en-US From: Ben Horgan In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Tony, On 6/3/26 19:46, Luck, Tony wrote: > Reinette, > > Tiny bug in "mpam,x86,fs/resctrl: Transition resource control to a list" > >> /* >> * Return length needed to display longest control suffix. >> * Add 1 for the "_" character when control name exists. >> */ >> size_t resctrl_resource_ctrl_max_len(struct rdt_resource *r) >> { >> struct resctrl_ctrl *ctrl; >> size_t total = 0; >> size_t len; >> >> for_each_resource_ctrl(ctrl,r) { >> len = strlen(resctrl_ctrl_name_str(ctrl->name)); >> if (len) >> total += 1 + len; > > Should be: > > total = max(total, 1 + len); > >> } >> >> return total; >> } > > Your sample code just converts "MB" over to using a list of controls. > Would it also work for code & data priority? E.g. by having controls > for "_CODE" and "_DATA" that are on the list when CDP is enabled, and > just a no name control for the default? Is there a plan to expand to support CDP for things other than cache allocation? This would help for MPAM as we currently don't support the MB schema when CDP is enabled for L2 or L3 as we have no way of reliably supporting it for the caches but not the memory allocation. Thanks, Ben > > -Tony