mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Zeng Heng" <zengheng@picoheart.com>
To: "Drew Fustini" <fustini@kernel.org>,
	"Adrien Ricciardi" <aricciardi@baylibre.com>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Atish Patra" <atish.patra@linux.dev>,
	"Babu Moger" <babu.moger@amd.com>,
	"Ben Horgan" <ben.horgan@arm.com>,
	"Borislav Petkov" <bp@alien8.de>,
	"Chen Pei" <cp0613@linux.alibaba.com>,
	"Conor Dooley" <conor.dooley@microchip.com>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"Dave Martin" <Dave.Martin@arm.com>,
	"Fenghua Yu" <fenghuay@nvidia.com>,
	"Gong Shuai" <gong.shuai@sanechips.com.cn>,
	"Gong Shuai" <gsh517@gmail.com>,
	guo.wenjia23@zte.com.cn, "James Morse" <james.morse@arm.com>,
	"Kornel Dulęba" <mindal@semihalf.com>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	liu.qingtao2@zte.com.cn,
	"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Paul Walmsley" <pjw@kernel.org>,
	"Peter Newman" <peternewman@google.com>,
	"Radim Krčmář" <radim.krcmar@oss.qualcomm.com>,
	"Reinette Chatre" <reinette.chatre@intel.com>,
	"Rob Herring" <robh@kernel.org>,
	"Samuel Holland" <samuel.holland@sifive.com>,
	"Sunil V L" <sunilvl@oss.qualcomm.com>,
	"Tony Luck" <tony.luck@intel.com>,
	"Weiwei Li" <liwei1518@gmail.com>,
	"yunhui cui" <cuiyunhui@bytedance.com>,
	"Zhanpeng Zhang" <zhangzhanpeng.jasper@bytedance.com>
Cc: "Catalin Marinas" <catalin.marinas@arm.com>,
	 "Jonathan Cameron" <jic23@kernel.org>,
	 "Shaopeng Tan" <tan.shaopeng@jp.fujitsu.com>,
	 <linux-kernel@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>,  <x86@kernel.org>,
	<devicetree@vger.kernel.org>,  <linux-doc@vger.kernel.org>
Subject: Re: [PATCH v11 0/5] riscv: Add initial CBQRI resctrl support
Date: Mon, 9 Nov 2026 21:06:09 +0800	[thread overview]
Message-ID: <bb2f816c-9c8d-4a27-8353-a946ba58870c@picoheart.com> (raw)
In-Reply-To: <20261108-dfustini-atl-sc-cbqri-dt-v11-0-33a1bf0cf01c@kernel.org>

Hi Drew,

在 11/9/26 上午7:20, Drew Fustini 写道:
> This series adds initial RISC-V QoS support through the CBQRI
> controller interface [1] integrated with resctrl [2], plus a DT-based
> platform driver for cache controllers. It builds on the Ssqosid
> extension [3] (srmcfg CSR) support that landed in the v7.3 merge
> window. It has been tested on both the Tenstorrent Ascalon Shared Cache
> controller and a QEMU implementation [4].
> 
>    qemu-system-riscv64 -M virt,aia=aplic-imsic -nographic -m 1G -smp 8 \
>        -kernel arch/riscv/boot/Image \
>        -append "root=/dev/vda ro console=ttyS0 rootwait" \
>        -drive if=none,file=rootfs.ext2,format=raw,id=hd0 \
>        -device virtio-blk-device,drive=hd0 \
>        -device riscv.cbqri.capacity,max_mcids=256,max_rcids=64,ncblks=16,mmio_base=0x04820000
> 
> Cache allocation can be exercised on the booted system. Mount resctrl
> and read the default schemata. The L2 controller has 16 capacity
> blocks, so the default capacity bitmask (CBM) is 0xffff:
> 
>    # mount -t resctrl resctrl /sys/fs/resctrl
>    # cat /sys/fs/resctrl/schemata
>    L2:0=ffff
> 
> Write a narrower CBM to a new control group and read it back to confirm
> the L2 controller applied it:
> 
>    # mkdir /sys/fs/resctrl/group0
>    # echo "L2:0=ff" > /sys/fs/resctrl/group0/schemata
>    # cat /sys/fs/resctrl/group0/schemata
>    L2:0=ff
> 
> Note that this series only implements support for resctrl L2 and L3
> cache resources using CBQRI capacity allocation control. cc_block_mask
> maps onto resctrl's existing cbm schema. However, cc_cunits is not
> supported as there is no existing equivalent for capacity units in the
> resctrl schemata.
> 
> I previously iterated on an RFC series [5] that implemented all of
> CBQRI, including capacity monitoring, bandwidth allocation and
> monitoring. The bandwidth controls for CBQRI do not fit well into
> resctrl's existing throttle-based MB schemata. I believe that the path
> forward is Reinette's generic schema description proof of concept [6].
> My plan is to rebase the full support of CBQRI onto the generic schema
> once it is ready.
> 
> Tony Luck's AET series [7] replaces resctrl_arch_alloc_capable() and
> resctrl_arch_mon_capable() with generic helpers that walk the resources.
> This series keeps the two hooks because resctrl on v7.4-rc1 still
> calls them, and answers the alloc hook from rdt_resource::alloc_capable
> so whichever series lands second only has to delete them. If the AET
> series lands first, the CBQRI glue will also need the three arch hooks
> it adds, resctrl_arch_system_max_rmid_idx(),
> resctrl_arch_get_num_rmid_idx() and resctrl_arch_unmount().
> 
> [1] https://github.com/riscv-non-isa/riscv-cbqri/releases/tag/v1.0
> [2] https://docs.kernel.org/filesystems/resctrl.html
> [3] https://github.com/riscv/riscv-ssqosid/releases/tag/v1.0
> [4] https://github.com/tt-fustini/qemu/tree/riscv-cbqri-cache
> [5] https://lore.kernel.org/linux-riscv/20260601-ssqosid-cbqri-rqsc-v7-0-v6-0-baf00f50028a@kernel.org/
> [6] https://lore.kernel.org/all/d258a32f-12d5-464d-abe9-4720fb3e44b3@intel.com/
> [7] https://lore.kernel.org/lkml/20261019205031.16977-1-tony.luck@intel.com/
> 

I have tested the CBQRI patch series, covering the following:

   * Boot-time initialization
   * Mounting and remounting the resctrl filesystem
   * Creating resctrl control groups
   * Configuring schemata for L3 block_mask resource allocation

All of the above worked as expected.

Tested-by: Zeng Heng <zengheng@picoheart.com>
Reviewed-by: Zeng Heng <zengheng@picoheart.com>


Best regards,
Zeng Heng

      parent reply	other threads:[~2026-11-09 13:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-08 23:20 Drew Fustini
2026-11-08 23:20 ` [PATCH v11 1/5] riscv_cbqri: Add capacity controller core Drew Fustini
2026-11-08 23:20 ` [PATCH v11 2/5] riscv_cbqri: resctrl: Add cache allocation via capacity block mask Drew Fustini
2026-11-10 23:17   ` Drew Fustini
2026-11-08 23:20 ` [PATCH v11 3/5] riscv_cbqri: Make RESCTRL_FS available on RISC-V Drew Fustini
2026-11-08 23:20 ` [PATCH v11 4/5] dt-bindings: riscv: Add binding for CBQRI controllers Drew Fustini
2026-11-08 23:20 ` [PATCH v11 5/5] riscv_cbqri: Add CBQRI capacity allocation platform driver Drew Fustini
2026-11-09 13:06 ` Zeng Heng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb2f816c-9c8d-4a27-8353-a946ba58870c@picoheart.com \
    --to=zengheng@picoheart.com \
    --cc=Dave.Martin@arm.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=aricciardi@baylibre.com \
    --cc=atish.patra@linux.dev \
    --cc=babu.moger@amd.com \
    --cc=ben.horgan@arm.com \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=cp0613@linux.alibaba.com \
    --cc=cuiyunhui@bytedance.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=fenghuay@nvidia.com \
    --cc=fustini@kernel.org \
    --cc=gong.shuai@sanechips.com.cn \
    --cc=gsh517@gmail.com \
    --cc=guo.wenjia23@zte.com.cn \
    --cc=james.morse@arm.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=liu.qingtao2@zte.com.cn \
    --cc=liwei1518@gmail.com \
    --cc=mindal@semihalf.com \
    --cc=palmer@dabbelt.com \
    --cc=peternewman@google.com \
    --cc=pjw@kernel.org \
    --cc=radim.krcmar@oss.qualcomm.com \
    --cc=reinette.chatre@intel.com \
    --cc=robh@kernel.org \
    --cc=samuel.holland@sifive.com \
    --cc=sunilvl@oss.qualcomm.com \
    --cc=tan.shaopeng@jp.fujitsu.com \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=zhangzhanpeng.jasper@bytedance.com \
    --cc=zhiwei_liu@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®