From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796111716; b=ksZG8tDisqrC2E822sLYX8Gk17aA32BfHg+M2ox5hDyAhN5kQNsSRap3jqMfY+WMh3hW 0H2VZFO2is6U5lHppjMLZRlF1tYrrYbD7mCrt2KAvE6td577WS5/95rdZJARJSSIRQImU yXn7t+8rH5O8N83MoiJVoGGCLRur95hUpBoD4LMPi9YorxL4uWWWP22ziYwkzGdtdUVDM 1mlBbDZSsGQwLkDOFJJhQkZPSy8U95kjqyNvf2x/Jic9QgviUpLS/NjOWOjN7La7kbEpc PBXne8cPuey1HDGbpHXqmy/+HZkL2Uh2dxXwnFH2louuHaNN+uo6ojSJ7VroKXy/F5Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796111716; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References:From: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding: X-Authority-Analysis:X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID: X-Proofpoint-Spam-Info:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=VG0aw4UE2GfgUjt+yfiaaLO8QblHGYD3WSNs0nr4jdM=; b=szrYwKjq1V/1EF+Gw7s2vQRGWHtfgD2LAcVb0a6I4ZFrq/7oOp9zSxrqQidCabNbDYw2 Yu4jVoLaajr4IM5TRHPoB1vk62lxLIzmu/+NoNCywSvXY4VETdJ3Okehdl0oECxjwD6YE e/cFXiai3xQ85m3vohcy5xGaq3fRkAB93ZujG/YULQPiujLvjFNisOgdOnvtbpPqB/3mu EL1HWqblsXjghKeUxptzAUAbtVVXWQtLnJVzuWaPjCMEN/jt2a+FYVI16Cx8JiPYXnL3j IE54aM9dtWeVvlSLpQFUKWYwHV4eOzUU3h4OxSr5+KlYJtkHt3Ag9WDmyZaIZfgnVaQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=hOybF61L; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=iFx9XFex; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F7CB606A31A for ; Tue, 1 Dec 2026 07:55:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1F7CB606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=hOybF61L; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=iFx9XFex Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B12KtPd2784475 for ; Tue, 1 Dec 2026 07:55:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= VG0aw4UE2GfgUjt+yfiaaLO8QblHGYD3WSNs0nr4jdM=; b=hOybF61LuE3Nh6AL QT2bHzjGn4es57v7yCf90T4RiC/BFDlWFE+IWwHyRr12wDZb5Ii58KX449DzV6Ai KSesSUD7Q6OQQM5AUZl7eWE8rEpNx8T50DoA7fE98S89A5o6ukeyo7g84qYY0g8r 8oiSpKMyZGVUzBu2imHmgQrSXVVyPiZYPkT0DWE6f4Q1oVOrETnKhSS9NjxWipMp dFF4FVJL41S0/+lA1iXvXEzf/TjFcEpz9E7O759ITbBehC9fHcmMiGVlYjGRuaOf hgS4h7E2OmBXYGd+7nZCCgnvzApuRToTiurnj1AdXwIpKPBhxrwVVs+EAQ5J5FUC 2Xv2ZQ== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j9enx2jny-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 01 Dec 2026 07:55:15 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2f0a0afb55dso12399885ad.2 for ; Mon, 30 Nov 2026 23:55:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796111714; x=1796716514; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=VG0aw4UE2GfgUjt+yfiaaLO8QblHGYD3WSNs0nr4jdM=; b=iFx9XFexuDd5K/uUZcXmIqESuOfsbpgIRg1xVT/uHsN+1/yT1RuDKy9rJH/kX38b5u Otegqm4Uy/nUAT1U2P4/vK38v92rXj3/fgl/YrEpobBmTE8cGYi1ki5XjhGjGuJq/OnV E7YZIa/f5rzYMNgeQwXW181Pb4vMovtl/LZcwrP3B+P7uGwa0CjxzSeEpoWe0sRS3pZL JLVzLzRzS1DFyTSOktuFU2Fg3m7ozlc5kp3VJAVSTiWkoxfgWTd/5afMvSqlt5SYrrB5 rh3rndf4EMtwZiOR2nlxT1xs61nQTs77CMvtdKqBq2Ef8YjNj2wZP+9URCNJ3jjh9LYp 5PGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796111714; x=1796716514; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=VG0aw4UE2GfgUjt+yfiaaLO8QblHGYD3WSNs0nr4jdM=; b=E9kDBbVDykFNMCkN/T87ySVA/2LpaA7u1mMpcb91po6Ziqme5tpyBhyLOtXpK/Lkli gIhPn3fYGFstXli8oK1edQMXO6GFlIxvNa/db4W0Ow5DCQ/sBBb15wL62YwSvOwPuFxV ajF+qsHi9MfA9eeJR9aBXHL4TUqDRFirxxv4NbILa9yuBFC+RYSKv9i+ovwN1byQsMYL 2S05vocdyL1BJex6jBkYTxcpKuOmec+u73HD+moJ9WUTwA7W0Hz4iMsChsD2+YfGd7Lu XgGS1mbQsjA9sh8QnPJ2lTMTOvSnngD9WjKkLYXGyFR+wk8ElgVRaHxX3r/0YUdNNN6e CljA== X-Forwarded-Encrypted: i=1; AL+hErFbbM+GBlDoxT7k/RU5loG2iQD6z1SFGhyTfxsiDn2Nl8cD5E5R8fpfgTU/8bkGz3/k2BWHu6gSkzh08ug=@vger.kernel.org X-Gm-Message-State: APuU4Z/Kk7qbqjODInOpwFSLZh0dqGXrIlFM5npF7dygU68uJQzdB0DC 0YWIFoUsK/dZP8UPHmVxtOE7U6JNwkruIuzfngR2Cr0bVZGmyz2OjTiZIkf21TRvl+l9JLkYVSZ uStFOzI6j94kwj047QDoKRL9+9aleVKYAdCuz6/fFeeFlpn3wOJAyjdKq7h+p7JBmVIAItnnnZn w= X-Gm-Gg: AZFdTZdtS2trgMbJ7hjyT2Mx9D2VDHFtnngMe3pZjCL04LsHxWH67Ou3/LEL01QlxSm RARxN/AWnmbvHPiOuamW/Jq9b4b0QMy+ps0GhCAxf8J8OGQu4qoA5BL1Q1Qy9PmPvINPfZZrnrR 5t0lx2HPoO+GAjj09P1DY4TSUNIwetA8l0KZbvff+bbgwfuOExj6v/5qh/HGnW0I6LhIOolniQ0 eu3IjATO/ueJCnpRUaXoFgCKGP0vHoCGqPzAYEZEOcsfsit/YV+VQWwNBGOn30dKTXPnVsqrsYw FZhpQPpjGIvbMRWdu6g35ubRiDX9Us7gPol8GfZ0HgglDfGnw6xEqDd3SBJhtNbWzbj8/DpsNkY 4NfL6PgQQB2K8jKdQN9tlXTzj3JGKY44Ao3CWFIlkY146aChVxy4GQZBJSVpnlpQPWCvwvriR X-Received: by 2002:a17:902:eccf:b0:2e9:9263:a58 with SMTP id d9443c01a7336-2f03f0c2295mr588811465ad.1.1796111714343; Mon, 30 Nov 2026 23:55:14 -0800 (PST) X-Received: by 2002:a17:902:eccf:b0:2e9:9263:a58 with SMTP id d9443c01a7336-2f03f0c2295mr588811205ad.1.1796111713814; Mon, 30 Nov 2026 23:55:13 -0800 (PST) Received: from [10.239.132.150] ([114.94.8.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2f03f0c6e50sm179106725ad.13.2026.11.30.23.55.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2026 23:55:13 -0800 (PST) Message-ID: Date: Tue, 1 Dec 2026 15:55:08 +0800 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [BOF]arm: resctrl: L3 cache partitioning via CLUSTERPARTCR To: James Morse , Tony Luck , Reinette Chatre , Dave Martin , Ben Horgan Cc: x86@kernel.org, Babu Moger , linux-kernel@vger.kernel.org, Fenghua Yu , Trilok Soni , yiwei.huang@oss.qualcomm.com, yin.li@oss.qualcomm.com References: <26b8a5b2-666a-473c-aa78-c70fe0649474@oss.qualcomm.com> <4179bde1-4ced-48cb-877d-93291c6029e5@arm.com> From: "Aiqun(Maria) Yu" Content-Language: en-US In-Reply-To: <4179bde1-4ced-48cb-877d-93291c6029e5@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=Lv0HWXdc c=1 sm=1 tr=0 ts=6b0e7d63 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=Uz3yg00KUFJ2y2WijEJ4bw==:17 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=VwQbUJbxAAAA:8 a=C70QlgtrKx_1aKwGKycA:9 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q:22 X-Proofpoint-ORIG-GUID: JCYFPot8OB2t20MSb66unIZII-CJmyXJ X-Proofpoint-GUID: JCYFPot8OB2t20MSb66unIZII-CJmyXJ X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAxMDAzMSBTYWx0ZWRfX654VGGnztNUZ MxWeLS7dUvmShk4Ek2shN2lLNKEgBXLcpO71kn+nBrFlmTKDGRHv3JSmrepG9OPl1J+HhLvWjtK K7k1M7Q75qrDOW2/0Y+PJ/pm/Y/unO4= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAxMDAzMSBTYWx0ZWRfX1MMndRLNiFdY vvORMXAeweDhice8Eu4ukRk99W9bzn76hviS/IT+POSVTGNZr1O1m3WtFOTCpRMCKgsfWaATqY7 L7yC7CWzywGHvHuxVpf1MA1iu2Gfs2aDBpgv+Rg5DzPQtyk++F55orx57B2EpiP6VQ6tmHz7WXw Ute5v/jeAEG1Ku8YBioAqfGKkjUoJss0wz7sVfjh6U+QM0mn4nMjiNudjoS//DzTrgsVsP0vxPK VlaL6Ob7ibB5i1TQPNpn0yM6eQ9R898pTf1ewAjyPsLyHo/UC6+CsgiNIKHf6TOTMpLSbV8QT4W /cdCFiiGIg4CYpy/nquo6BvXE+CTd0PvekbCtb/XbenDbnUQx7abNXvoso+qTCOnF0l5NUhpB72 RgG+mA/z13jEA/iVxcmpkoqncgc5ul2QKm91kpCjgdUgFIv2/Ks6OLgoMUd1aOgTh1sv2VTGd+0 R3DsSy+muheJYY5z9GQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-01_01,2026-11-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 bulkscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 spamscore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612010031 On 6/30/2026 10:59 PM, James Morse wrote: > Hi Aiqun, > > On 30/06/2026 12:48, Aiqun(Maria) Yu wrote: >> L3 cache partitioning is an important feature for improving performance >> isolation of latency-sensitive tasks. While ARM MPAM provides a >> comprehensive solution, > >> there exists another ARM register, CLUSTERPARTCR, > > It's important to note this isn't an ARM architecture feature or register, > it's part of one version of DSU, which is a shared-cache IP in some designs. Thx for the correction. > > >> which offers L3 cache partitioning functionality similar to MPAM's CPBM >> (Cache Portion BitMask) but is not part of the MPAM architecture. > > ... and as its not part of any architectural feature, is going to be very hard > to use. It is hard, but still useful in some scenario. :) > > >> CLUSTERPARTCR is a cluster-level register that allows software to partition >> L3 cache capacity among different workloads. Although its partitioning >> granularity and flexibility are more limited compared to full MPAM support, >> it remains a practically important interface for platforms that do not >> implement MPAM but still need L3 cache partitioning capability. > > This stuff is designed for static SoC configurations. e.g. CPU-4 is running > your modem stack. I don't this is going to work well with general purpose > things like linux and resctrl. > > >> This raises the following questions for the community: >> >> 1. Is there interest in accommodating CLUSTERPARTCR-based L3 partitioning >> within the existing resctrl framework, given that it provides similar >> semantics to Intel RDT's cache allocation technology (CAT)? > > I'd say that is impossible. > > This would rely on accessing implementation defined system registers, not just > in some driver - but in the architecture's context-switch path. This has been a > hard no in the past. For just the imp-def part, see: [0][1][2] I see the good point here. What about if we make the driver more standalone. And not context-switch path affected. So it can be a scheme ID based configuration only. Only specific tasks with the same scheme ID will be configured. > > Doing this doesn't virtualise as all those registers are trapped by HCR_EL2.TIDCP, > the hypervisor can't emulate these registers as they can behave differently on > each CPU. The only option is to emulate an undefined instruction exception. > This makes detecting the SoCs where this could be used very difficult. > > >> 2. Alternatively, would it be more appropriate to integrate it under the >> MPAM resctrl framework as a non-MPAM backend, given the functional >> similarity to MPAM CPBM? > > I don't think its at all similar. > > This doesn't map to the L3/CPBM bitmap schema. A group is 4 ways, and the control > is only to make a group private to an 'ID'. You can't share a group between two > resctrl groups - which the bitmap schema allows. > > As an ugly corner case: if you tried to express the groups as a bitmap, a 12-way > cache configuration would have 3 groups - meaning a two bit bitmap has invalid values. > > This is all because its not really a bitmap in hardware. > > > The datasheet/TRM you linked doesn't say that the partition controls can be changed > at runtime. Resctrl requires this. > While the document doesn't say either way - its very common for interconnect IP to > expect configuration information to only be written to during power-on, when there > is no traffic flowing in the system. Linux can't ever do this. Per current prototype, it can be runtime changed and functional as expected. > > >> 3. Are there any concerns or constraints in the current resctrl/MPAM >> framework that would prevent such an integration? > > Not just the imp-def system registers: There is no way of detecting whether > this is present in any particular SoC. You can't have a table of SoCs where > it happens to be as it also depends on the EL3 firmware to turn this interface > on, and a hypervisor not being present. > > The system registers imply some knowledge of the topology, its not just which > CPUs share a DSU, but where an 'ACP' goes, and what a 'STASH' is for. > > > It looks like there are 8 'partition scheme IDs', but only 'four private L3 cache > partitions can be created' - so depending on what is written to the schema file, > there may be only four control groups usable. Good point. So maybe we can have a standalone interface which is static scheme ID base configuration only. Runtime specific interface to configure for specific scheme ID. We can have an BOF driver example code for reference if it is agreed. > > >> Any comments, suggestions, or pointers to prior discussion on this topic >> are very much appreciated. > I don't think this is workable for either resctrl or the architecture code. > > DSU supports MPAM, so presumably this is for an older version that doesn't have the > MPAM feature? yes. Here are the older versions that don't support MPAM. > > > Thanks, > > James > > [0] https://lore.kernel.org/linux-arm-kernel/20151026124616.GB9740@leverpostej/ > [1] https://lore.kernel.org/linux-arm-kernel/20201120101249.GA2328@C02TD0UTHF1T.local/ > [2] https://lore.kernel.org/linux-arm-kernel/20210108125410.GA84941@C02TD0UTHF1T.local/ -- Thx and BRs, Aiqun(Maria) Yu