From: sashiko-bot@kernel.org
To: "Drew Fustini" <fustini@kernel.org>
Cc: robh@kernel.org, conor+dt@kernel.org,
linux-rt-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v8 2/5] riscv_cbqri: resctrl: Add cache allocation via capacity block mask
Date: Thu, 17 Sep 2026 16:57:42 +0000 [thread overview]
Message-ID: <20260917165743.390201F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260917-dfustini-atl-sc-cbqri-dt-v8-2-7964e8d73fe8@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] cbqri: late-registered capacity controllers bypass capability agreement check
--
commit d3ff1ae1d79d6e8e4041b4efbc3516187f2222a6
Author: Drew Fustini <fustini@kernel.org>
riscv_cbqri: resctrl: Add cache allocation via capacity block mask
This commit wires up CBQRI capacity controllers into resctrl for L2 and
L3 resources. It manages control domains during CPU hotplug and requires
all controllers at the same cache level to report identical capabilities.
> diff --git a/drivers/resctrl/cbqri_resctrl.c b/drivers/resctrl/cbqri_resctrl.c
> new file mode 100644
> --- /dev/null
> +++ b/drivers/resctrl/cbqri_resctrl.c
[ ... ]
> +static int cbqri_attach_cpu_to_all_ctrls(unsigned int cpu)
> +{
> + static const u32 levels[] = { 2, 3 };
> + struct cbqri_controller *ctrl, *c;
> + struct cbqri_resctrl_res *hw_res;
> + struct rdt_ctrl_domain *d;
[ ... ]
> + d = cbqri_find_ctrl_domain(&hw_res->resctrl_res.ctrl_domains,
> + ci->id);
> + if (d) {
> + cpumask_set_cpu(cpu, &d->hdr.cpu_mask);
> + continue;
> + }
> +
> + d = cbqri_create_ctrl_domain(ctrl, &hw_res->resctrl_res, cpu,
> + ci->id);
[Severity: Medium]
Does this bypass the capability agreement check for dynamically registered
controllers?
If a CBQRI capacity controller is registered late (for instance, via a DT
overlay) and its CPU is subsequently onlined,
cbqri_attach_cpu_to_all_ctrls() will discover the controller backing the
new CPU and create a domain for it.
However, I don't see a call to cbqri_cc_caps_agree(hw_res->ctrl, ctrl)
before creation to verify that the late controller's capabilities match.
If the new controller has capabilities (like block mask size or RCID count)
that differ from the boot-time selected controller, will this group
mismatched controllers into the same resctrl resource?
Could this cause capacity configuration operations to fail gracefully with
-EIO when hardware limits are exceeded, or otherwise abort CPU hotplug?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260917-dfustini-atl-sc-cbqri-dt-v8-0-7964e8d73fe8@kernel.org?part=2
next prev parent reply other threads:[~2026-09-17 16:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 16:39 [PATCH v8 0/5] riscv: Add initial CBQRI resctrl support Drew Fustini
2026-09-17 16:39 ` [PATCH v8 1/5] riscv_cbqri: Add capacity controller probe and allocation device ops Drew Fustini
2026-09-17 16:39 ` [PATCH v8 2/5] riscv_cbqri: resctrl: Add cache allocation via capacity block mask Drew Fustini
2026-09-17 16:57 ` sashiko-bot [this message]
2026-09-17 19:59 ` Drew Fustini
2026-09-18 0:54 ` Reinette Chatre
2026-09-17 16:39 ` [PATCH v8 3/5] riscv_cbqri: Make RESCTRL_FS available on RISC-V Drew Fustini
2026-09-17 16:39 ` [PATCH v8 4/5] dt-bindings: riscv: Add binding for CBQRI controllers Drew Fustini
2026-09-17 16:39 ` [PATCH v8 5/5] riscv_cbqri: Add CBQRI capacity allocation platform driver Drew Fustini
2026-09-17 17:11 ` sashiko-bot
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=20260917165743.390201F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fustini@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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®