From: Drew Fustini <fustini@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC v6 11/18] riscv_cbqri: resctrl: Add cache allocation via capacity block mask
Date: Mon, 1 Jun 2026 21:31:57 -0700 [thread overview]
Message-ID: <ah5cvQ6QHqzQYd46@gen8> (raw)
In-Reply-To: <20260601205608.D86481F00893@smtp.kernel.org>
On Mon, Jun 01, 2026 at 08:56:08PM +0000, sashiko-bot@kernel.org wrote:
> > @@ -595,6 +595,7 @@ config RISCV_ISA_SSQOSID
> > bool "Ssqosid extension support for supervisor mode Quality of Service ID"
> > depends on 64BIT
> > default n
> > + select ARCH_HAS_CPU_RESCTRL
>
> Does selecting ARCH_HAS_CPU_RESCTRL here unconditionally allow RESCTRL_FS
> to be enabled, even if the RISC-V backend driver isn't built?
>
> Since the backend implementation in cbqri_resctrl.c is gated by
> RISCV_CBQRI_DRIVER:
>
> config RISCV_CBQRI_RESCTRL_FS
> bool
> default y if RISCV_CBQRI_DRIVER && RESCTRL_FS
>
> Could this result in a linker error for missing resctrl_arch_* symbols if
> RISCV_ISA_SSQOSID is enabled but RISCV_CBQRI_DRIVER is disabled?
This is not reachable. RESCTRL_FS cannot be enabled without the backend that provides the resctrl_arch_* symbols.
> > + cbqri_res = &cbqri_resctrl_resources[rid];
> > + if (cbqri_res->ctrl) {
> > + /*
> > + * CCs at the same cache level must agree on every cap
> > + * resctrl exposes globally. Reject mismatches at pick
> > + * time so the inconsistency is visible at boot.
> > + */
> > + if (cbqri_res->ctrl->rcid_count != ctrl->rcid_count ||
> > + cbqri_res->ctrl->cc.ncblks != ctrl->cc.ncblks ||
> > + cbqri_res->ctrl->cc.supports_alloc_at_code !=
> > + ctrl->cc.supports_alloc_at_code ||
> > + cbqri_res->ctrl->alloc_capable != ctrl->alloc_capable) {
>
> Is this alloc_capable mismatch check dead code?
>
> Because the earlier loop condition explicitly skips controllers where
> alloc_capable is false:
>
> if (!ctrl->alloc_capable) {
> ...
> continue;
> }
>
> Will both cbqri_res->ctrl and the current ctrl always have alloc_capable
> set to true at this point in cbqri_resctrl_pick_caches? This seems to
> cause non-alloc-capable controllers to be silently ignored rather than
> triggering the fatal configuration error described in the commit message.
It is harmless, but I will drop the dead term in v7 for clarity.
Drew
next prev parent reply other threads:[~2026-06-02 4:32 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 20:35 [PATCH RFC v6 00/18] riscv: add Ssqosid and CBQRI resctrl support Drew Fustini
2026-06-01 20:35 ` [PATCH RFC v6 01/18] dt-bindings: riscv: Add Ssqosid extension description Drew Fustini
2026-06-01 20:35 ` [PATCH RFC v6 02/18] riscv: detect the Ssqosid extension Drew Fustini
2026-06-01 20:35 ` [PATCH RFC v6 03/18] riscv: add support for srmcfg CSR from " Drew Fustini
[not found] ` <20260601204931.3A9481F00893@smtp.kernel.org>
2026-06-02 0:58 ` Drew Fustini
2026-06-01 20:35 ` [PATCH RFC v6 04/18] fs/resctrl: Add resctrl_is_membw() helper Drew Fustini
2026-06-01 20:35 ` [PATCH RFC v6 05/18] fs/resctrl: Add RDT_RESOURCE_MB_MIN and RDT_RESOURCE_MB_WGHT Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 06/18] fs/resctrl: Let bandwidth resources default to min_bw at reset Drew Fustini
[not found] ` <20260601205517.7AAAC1F00893@smtp.kernel.org>
2026-06-02 1:11 ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 07/18] riscv_cbqri: Add capacity controller probe and allocation device ops Drew Fustini
[not found] ` <20260601204809.187341F00898@smtp.kernel.org>
2026-06-02 2:17 ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 08/18] riscv_cbqri: Add capacity controller monitoring " Drew Fustini
[not found] ` <20260601205149.A07E31F00893@smtp.kernel.org>
2026-06-02 2:20 ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 09/18] riscv_cbqri: Add bandwidth controller probe and allocation " Drew Fustini
[not found] ` <20260601204931.F08EA1F00898@smtp.kernel.org>
2026-06-02 4:27 ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 10/18] riscv_cbqri: Add bandwidth controller monitoring " Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 11/18] riscv_cbqri: resctrl: Add cache allocation via capacity block mask Drew Fustini
[not found] ` <20260601205608.D86481F00893@smtp.kernel.org>
2026-06-02 4:31 ` Drew Fustini [this message]
2026-06-01 20:36 ` [PATCH RFC v6 12/18] riscv_cbqri: resctrl: Add L3 cache occupancy monitoring Drew Fustini
[not found] ` <20260601205837.C1AC91F00893@smtp.kernel.org>
2026-06-02 4:47 ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 13/18] riscv_cbqri: resctrl: Add MB_MIN bandwidth allocation via Rbwb Drew Fustini
[not found] ` <20260601205717.7FDA51F00893@smtp.kernel.org>
2026-06-02 5:00 ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 14/18] riscv_cbqri: resctrl: Add MB_WGHT bandwidth allocation via Mweight Drew Fustini
[not found] ` <20260601205734.76D021F00893@smtp.kernel.org>
2026-06-02 17:35 ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 15/18] riscv_cbqri: resctrl: Add mbm_total_bytes bandwidth monitoring Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 16/18] ACPI: RISC-V: Parse RISC-V Quality of Service Controller (RQSC) table Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 17/18] ACPI: RISC-V: Add support for RISC-V Quality of Service Controller (RQSC) Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 18/18] riscv: enable resctrl filesystem for Ssqosid Drew Fustini
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=ah5cvQ6QHqzQYd46@gen8 \
--to=fustini@kernel.org \
--cc=linux-kernel@vger.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®