From: Drew Fustini <fustini@kernel.org>
To: "Adrien Ricciardi" <aricciardi@baylibre.com>,
"Alexandre Ghiti" <alex@ghiti.fr>,
"Atish Kumar Patra" <atishp@rivosinc.com>,
"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ář" <rkrcmar@ventanamicro.com>,
"Reinette Chatre" <reinette.chatre@intel.com>,
"Rob Herring" <robh@kernel.org>,
"Samuel Holland" <samuel.holland@sifive.com>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Tony Luck" <tony.luck@intel.com>,
"Vasudevan Srinivasan" <vasu@rivosinc.com>,
"Ved Shanbhogue" <ved@rivosinc.com>,
"Weiwei Li" <liwei1518@gmail.com>,
"yunhui cui" <cuiyunhui@bytedance.com>
Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
x86@kernel.org, devicetree@vger.kernel.org,
linux-rt-devel@lists.linux.dev, linux-doc@vger.kernel.org
Subject: Re: [PATCH v4 8/8] riscv_cbqri: Add CBQRI capacity allocation platform driver
Date: Wed, 8 Jul 2026 23:09:47 -0700 [thread overview]
Message-ID: <ak87K0bIqIPZbMoY@x1> (raw)
In-Reply-To: <20260706-dfustini-atl-sc-cbqri-dt-v4-8-e75c20201d64@kernel.org>
Hi Reinette,
(replying in v4 as you suggested)
On Tue, Jul 07, 2026 at 11:18:00AM -0700, Reinette Chatre wrote:
> On 6/28/26 2:18 PM, Drew Fustini wrote:
> > + cache_id = -1;
> > + cpus_read_lock();
> > + for_each_online_cpu(cpu) {
> > + struct cacheinfo *ci = get_cpu_cacheinfo_level(cpu, cache_level);
> > +
> > + if (ci && ci->fw_token == cache_np) {
> > + cache_id = ci->id;
> > + cpumask_copy(cpu_mask, &ci->shared_cpu_map);
>
> The way I understand cacheinfo::shared_cpu_map is that it only contains the
> online CPUs that share the cache with this CPU and if the CPU is offline
> then shared_cpu_map only contains the CPU self.
>
> It is thus not clear to me that this handles all the possible CPU online vs
> offline scenarios. For example, if all or some CPUs of a domain are offline
> during cbqri_capacity_probe() and then come online later. It is not clear
> to me whether cbqri_controller_info::cache_id,
> cbqri_controller::cache_controller::cache_id, or
> cbqri_controller::cache_controller::cpu_mask are needed. Could the cache ID
> associated with a CPU at the time it comes online to dynamically associate
> it with the resctrl domain that is indexed by the cache ID? This may
> simplify a couple of flows.
Thank you for the suggestion, it does simplify things. I will drop the
probe-time cpu_mask and associate CPUs with domains the way you suggest,
from the CPU's own cache id at hotplug time.
Thanks,
Drew
WARNING: multiple messages have this Message-ID (diff)
From: Drew Fustini <fustini@kernel.org>
To: "Adrien Ricciardi" <aricciardi@baylibre.com>,
"Alexandre Ghiti" <alex@ghiti.fr>,
"Atish Kumar Patra" <atishp@rivosinc.com>,
"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ář" <rkrcmar@ventanamicro.com>,
"Reinette Chatre" <reinette.chatre@intel.com>,
"Rob Herring" <robh@kernel.org>,
"Samuel Holland" <samuel.holland@sifive.com>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Tony Luck" <tony.luck@intel.com>,
"Vasudevan Srinivasan" <vasu@rivosinc.com>,
"Ved Shanbhogue" <ved@rivosinc.com>,
"Weiwei Li" <liwei1518@gmail.com>,
"yunhui cui" <cuiyunhui@bytedance.com>
Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
x86@kernel.org, devicetree@vger.kernel.org,
linux-rt-devel@lists.linux.dev, linux-doc@vger.kernel.org
Subject: Re: [PATCH v4 8/8] riscv_cbqri: Add CBQRI capacity allocation platform driver
Date: Wed, 8 Jul 2026 23:09:47 -0700 [thread overview]
Message-ID: <ak87K0bIqIPZbMoY@x1> (raw)
In-Reply-To: <20260706-dfustini-atl-sc-cbqri-dt-v4-8-e75c20201d64@kernel.org>
Hi Reinette,
(replying in v4 as you suggested)
On Tue, Jul 07, 2026 at 11:18:00AM -0700, Reinette Chatre wrote:
> On 6/28/26 2:18 PM, Drew Fustini wrote:
> > + cache_id = -1;
> > + cpus_read_lock();
> > + for_each_online_cpu(cpu) {
> > + struct cacheinfo *ci = get_cpu_cacheinfo_level(cpu, cache_level);
> > +
> > + if (ci && ci->fw_token == cache_np) {
> > + cache_id = ci->id;
> > + cpumask_copy(cpu_mask, &ci->shared_cpu_map);
>
> The way I understand cacheinfo::shared_cpu_map is that it only contains the
> online CPUs that share the cache with this CPU and if the CPU is offline
> then shared_cpu_map only contains the CPU self.
>
> It is thus not clear to me that this handles all the possible CPU online vs
> offline scenarios. For example, if all or some CPUs of a domain are offline
> during cbqri_capacity_probe() and then come online later. It is not clear
> to me whether cbqri_controller_info::cache_id,
> cbqri_controller::cache_controller::cache_id, or
> cbqri_controller::cache_controller::cpu_mask are needed. Could the cache ID
> associated with a CPU at the time it comes online to dynamically associate
> it with the resctrl domain that is indexed by the cache ID? This may
> simplify a couple of flows.
Thank you for the suggestion, it does simplify things. I will drop the
probe-time cpu_mask and associate CPUs with domains the way you suggest,
from the CPU's own cache id at hotplug time.
Thanks,
Drew
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-07-09 6:09 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 23:06 [PATCH v4 0/8] riscv: Add Ssqosid and initial CBQRI resctrl support Drew Fustini
2026-07-06 23:06 ` Drew Fustini
2026-07-06 23:06 ` [PATCH v4 1/8] dt-bindings: riscv: Add Ssqosid extension description Drew Fustini
2026-07-06 23:06 ` Drew Fustini
2026-07-06 23:06 ` [PATCH v4 2/8] riscv: Detect the Ssqosid extension Drew Fustini
2026-07-06 23:06 ` Drew Fustini
2026-07-06 23:06 ` [PATCH v4 3/8] riscv: Add support for srmcfg CSR from " Drew Fustini
2026-07-06 23:06 ` Drew Fustini
2026-07-06 23:17 ` sashiko-bot
2026-07-07 0:25 ` Drew Fustini
2026-07-07 0:25 ` Drew Fustini
2026-07-06 23:06 ` [PATCH v4 4/8] riscv_cbqri: Add capacity controller probe and allocation device ops Drew Fustini
2026-07-06 23:06 ` Drew Fustini
2026-07-06 23:06 ` [PATCH v4 5/8] riscv_cbqri: resctrl: Add cache allocation via capacity block mask Drew Fustini
2026-07-06 23:06 ` Drew Fustini
2026-07-06 23:20 ` sashiko-bot
2026-07-07 0:45 ` Drew Fustini
2026-07-07 0:45 ` Drew Fustini
2026-07-07 18:17 ` Reinette Chatre
2026-07-07 18:17 ` Reinette Chatre
2026-07-12 19:15 ` Drew Fustini
2026-07-12 19:15 ` Drew Fustini
2026-07-06 23:06 ` [PATCH v4 6/8] riscv: Enable resctrl filesystem for Ssqosid Drew Fustini
2026-07-06 23:06 ` Drew Fustini
2026-07-06 23:06 ` [PATCH v4 7/8] dt-bindings: riscv: Add binding for CBQRI controllers Drew Fustini
2026-07-06 23:06 ` Drew Fustini
2026-07-06 23:06 ` [PATCH v4 8/8] riscv_cbqri: Add CBQRI capacity allocation platform driver Drew Fustini
2026-07-06 23:06 ` Drew Fustini
2026-07-07 8:48 ` Uwe Kleine-König
2026-07-07 8:48 ` Uwe Kleine-König
2026-07-07 19:26 ` Drew Fustini
2026-07-07 19:26 ` Drew Fustini
2026-07-09 6:09 ` Drew Fustini [this message]
2026-07-09 6:09 ` 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=ak87K0bIqIPZbMoY@x1 \
--to=fustini@kernel.org \
--cc=Dave.Martin@arm.com \
--cc=alex@ghiti.fr \
--cc=aricciardi@baylibre.com \
--cc=atish.patra@linux.dev \
--cc=atishp@rivosinc.com \
--cc=babu.moger@amd.com \
--cc=ben.horgan@arm.com \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--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=gong.shuai@sanechips.com.cn \
--cc=gsh517@gmail.com \
--cc=guo.wenjia23@zte.com.cn \
--cc=james.morse@arm.com \
--cc=krzk+dt@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-rt-devel@lists.linux.dev \
--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=reinette.chatre@intel.com \
--cc=rkrcmar@ventanamicro.com \
--cc=robh@kernel.org \
--cc=samuel.holland@sifive.com \
--cc=tony.luck@intel.com \
--cc=vasu@rivosinc.com \
--cc=ved@rivosinc.com \
--cc=x86@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.