From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 7FFB3606A31C for ; Mon, 30 Nov 2026 07:17:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=kcalegSf; dkim=pass (1024-bit key, unprotected) header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256 header.s=dkim header.b=NyyW+XVf DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=tdJKaI9pwid6nyyvYiej1vWksE3uox8ZOi/DcQWXfb4=; b=kcalegSfFI3GPa EH6wHOjCfywseSqmKVyOYncjcA2jBkDRZ1pnYYEdiOWYgb/AZBcaeCyGM1lV9YYwN8n5vRjHFYrLQ 0PRXqAv4ojV/jGaRoQA9TKu/n6wT1xArbR3jn6craxiJHxtrjbdNvjG/RZkiqAuyo6v0/ceKJAkBg 1dheVn9zK9JM1AuJXmoedQdkqkoFCYIN6BmXFj9Vo8gQdOVRnTgmclNesE3iNhFylehFCM2B807YY Deu60rM/I+Z9kHWYdU0do4ZXCfJB7DdB0JiZjeFPqLiiXkT6KqYE5l9QtDPB9JH0zLnjofRpwXue8 4fmA6Mr508b3PPj/VrIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXufv-00000003Nv9-2x5X; Mon, 30 Nov 2026 06:15:43 +0000 Received: from canpmsgout02.his.huawei.com ([113.46.200.217]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXufd-00000003NnK-3R6r; Mon, 30 Nov 2026 06:15:32 +0000 dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=tdJKaI9pwid6nyyvYiej1vWksE3uox8ZOi/DcQWXfb4=; b=NyyW+XVfCL96yMfomk3tzQ9CRF10Fka6q4Z/lYNe00IScOsFT/mCJ6WzGAXqQEdTqXGVWuQW8 fR9E7VwnSOtXyVHCUyryxZhhSYrvaRGQz9oMn51yigRjr48l8BH13LW6SyR1WltEy2PQP91GZR4 gPoX1V+fJV4cgCopyrqxdHI= Received: from mail.maildlp.com (unknown [172.19.162.197]) by canpmsgout02.his.huawei.com (SkyGuard) with ESMTPS id 4jdDHb4R56zcZxm; Mon, 30 Nov 2026 14:14:03 +0800 (CST) Received: from kwepemk200008.china.huawei.com (unknown [7.202.194.74]) by mail.maildlp.com (Postfix) with ESMTPS id 0FDEF40579; Mon, 30 Nov 2026 14:15:18 +0800 (CST) Received: from [10.67.110.68] (10.67.110.68) by kwepemk200008.china.huawei.com (7.202.194.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Mon, 30 Nov 2026 14:15:17 +0800 Message-ID: <0c2c448b-0726-4ea5-b772-70646d8b51c9@huawei.com> Date: Mon, 30 Nov 2026 14:15:16 +0800 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 00/13] resctrl: Introduce a framework for logical control IDs To: Yunhui Cui , , , , , , , , , , , , , , , , , , , , , , , , References: <20261130022929.71748-1-cuiyunhui@bytedance.com> From: Jinjie Ruan In-Reply-To: <20261130022929.71748-1-cuiyunhui@bytedance.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: kwepems500002.china.huawei.com (7.221.188.17) To kwepemk200008.china.huawei.com (7.202.194.74) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261129_221529_676596_445C9143 X-CRM114-Status: GOOD ( 20.02 ) X-Spam-Score: -2.8 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 在 2026/11/30 10:29, Yunhui Cui 写道: > Some resource controllers can accept a wider request-ID namespace than > the number of configuration entries they provide. Arm MPAM PARTID > narrowing is one example: requests carry a PARTID, while an MSC maps it > to a smaller internal PARTID table. A future RISC-V CBQRI backend is We have been working on narrow partid for a long time. Could you please drop the patches related to MPAM narrow partid? Link: https://lore.kernel.org/all/20261020134239.3921377-1-ruanjinjie@huawei.com/ > expected to need a similar mapping from request RCIDs to controller-local > entries. Resctrl currently uses one ID both to identify a control group > and to select its hardware entry, so the smallest table limits the number > of groups exposed to user space. > > The framework uses a logical control ID in generic resctrl while each > architecture selects a hardware entry according to its own model: > > generic resctrl > logical control ID > | > +------------------+------------------+ > | | | > x86 arm64 MPAM RISC-V CBQRI > direct index MSC mapping mapping (proposed) > | | | > hardware entry internal PARTID controller entry > > Without controller-local request-ID mapping, the same request ID directly > indexes every controller. If g1 configures only A and g2 only B, g1 > cannot select its private entry in A and B's root entry while g2 makes > the opposite selection. Each group therefore consumes an entry in both > controllers. Controller-local mapping makes these selections independent, > so A needs entries only for the root group and g1 while B needs only the > root group and g2. > > This series gives control groups logical IDs. A new group initially > selects the root policy and consumes no private entry on a narrowing > controller. Its first explicit policy write allocates and programs an > entry only on the affected controllers, then publishes the > request-to-internal ID mapping. Controllers that have not been configured > continue to follow the root policy. A same-value write still creates a > private policy, so a later root update does not change it. > > Entry reservation is completed before a multi-controller policy update > and mapping changes are published only after the entries are programmed. > Group removal maps requests back to the root entry before an internal > entry or logical ID can be reused. CDP keeps separate data and code root > entries so the default policies remain distinct. > > Identity-mapped architectures retain their current behavior, and I/O > allocation continues to address a hardware entry directly. The generic > framework supports both direct-index and mapped controllers. The RISC-V > backend itself is outside this series. > > Base: next-20261127 > > Yunhui Cui (13): > resctrl: Introduce interfaces for logical control IDs > resctrl: Add prepare, commit and abort hooks for control updates > resctrl: Add a release hook before logical control ID reuse > arm_mpam: Record PARTID narrowing capacity per MSC > arm_mpam: Select PARTID narrowing per component > arm_mpam: Add an internal PARTID allocator > arm_mpam: Add request-to-internal PARTID mapping > arm_mpam: Apply PARTID narrowing to resctrl control groups > arm_mpam: Separate request and internal PARTID limits > arm_mpam: Map CDP data and code defaults separately > arm_mpam: Add kunit tests for PARTID narrowing > selftests/resctrl: Add a test for control ID allocation and reuse > docs/resctrl: Document logical control IDs and hardware entries > > Documentation/filesystems/resctrl.rst | 88 ++ > arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 38 +- > drivers/resctrl/mpam_devices.c | 857 +++++++++++++++++- > drivers/resctrl/mpam_internal.h | 25 +- > drivers/resctrl/mpam_resctrl.c | 288 +++++- > drivers/resctrl/test_mpam_devices.c | 619 ++++++++++++- > drivers/resctrl/test_mpam_resctrl.c | 172 ++++ > fs/resctrl/ctrlmondata.c | 28 +- > fs/resctrl/rdtgroup.c | 18 +- > include/linux/resctrl.h | 17 +- > .../testing/selftests/resctrl/ctrl_id_test.c | 380 ++++++++ > tools/testing/selftests/resctrl/resctrl.h | 1 + > .../testing/selftests/resctrl/resctrl_tests.c | 1 + > 13 files changed, 2470 insertions(+), 62 deletions(-) > create mode 100644 tools/testing/selftests/resctrl/ctrl_id_test.c >