From: Chen Yu <chen.yu@linux.dev>
To: Chen Yu <yu.c.chen@intel.com>
Cc: tony.luck@intel.com, reinette.chatre@intel.com, tglx@kernel.org,
bp@alien8.de, mingo@redhat.com, dave.hansen@linux.intel.com,
hpa@zytor.com, fenghuay@nvidia.com, babu.moger@amd.com,
hongyu.ning@intel.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v9 00/12] Introduce MMIO-based CMT access for Enhanced RDT
Date: Mon, 19 Oct 2026 20:45:51 +0800 [thread overview]
Message-ID: <atYQ_-VdsucficcN@three-body> (raw)
In-Reply-To: <cover.1791933001.git.yu.c.chen@intel.com>
On Wed, Oct 14, 2026 at 10:56:57AM +0800, Chen Yu wrote:
>
> V9 has gone through local sashiko review, with false positives left
> unaddressed. Also used AI to confirm each review feedback has been
> addressed by v9. The change history in the section "Changes since v8"
> in each patch is generated by AI.
>
Address sashiko.dev review feedback at
https://sashiko.dev/#/patchset/cover.1791933001.git.yu.c.chen%40intel.com
All 3 feedbacks from sashiko.dev have once been reported in the internal sashiko review.
They are false positive or expected behavior:
sashiko feedback1:
> @@ -742,6 +746,13 @@ static int resctrl_arch_online_cpu(unsigned int cpu)
> struct rdt_resource *r;
>
> mutex_lock(&domain_list_lock);
> + /* Refuse to online a CPU whose ERDT and CPUID L3 domain views disagree. */
> + if (!erdt_try_bind_cpu(cpu)) {
> + mutex_unlock(&domain_list_lock);
> + clear_closid_rmid(cpu);
> + return -EINVAL;
Does returning an error from resctrl_arch_online_cpu() abort the CPU hotplug
state machine, preventing the CPU from joining the system?
The commit message mentions this is an intentional tradeoff to avoid
complicating cpus_ctrl_write(). However, since ACPI ERDT is an optional
performance monitoring feature, returning -EINVAL here on systems with buggy
ACPI tables appears to permanently disable CPU cores. Could this be changed
to leave the CPU online but unbound from any resctrl domains?
response1 to sashiko:
This is expected, and it is a trade-off between “simplicity” and ”absolute correctness“:
"Leaving the CPU online but outside all resctrl domains is doable, but it would require a
change to cpus_ctrl_write() to reject CPUs that are online but not tracked by
any resctrl group. The current approach is stricter, but simpler."
sashiko feedback2:
>
> +unsigned int resctrl_arch_round_mon_val(unsigned int val)
> +{
> + unsigned int scale = boot_cpu_data.x86_cache_occ_scale;
> +
> + /* h/w works in units of "boot_cpu_data.x86_cache_occ_scale" */
> + val /= scale;
Will this divide by zero if the hardware or hypervisor reports a cache
occupancy scale of 0 via CPUID leaf 0xf sub-leaf 1 (EBX=0)?
response2 to sashiko:
This is a pre-existing issue. If the scale is zero, then this machine is unreliable,
panicking the system would be acceptable.
sashiko feedback3:
> +
> + l3_cmt_count = readq(d->base[ERDT_MMIO_CMRC_BASE] + offset);
Could this result in an unaligned MMIO read that crashes the kernel?
response3 to sashiko:
On x86 there is no 8 bytes alignment requirement for readq address.
thanks,
Chenyu
prev parent reply other threads:[~2026-10-19 12:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 2:56 Chen Yu
2026-10-14 2:57 ` [PATCH v9 01/12] x86/topology: Export topo_lookup_cpuid() for resctrl use Chen Yu
2026-10-14 2:58 ` [PATCH v9 02/12] x86/resctrl: Require 64-bit x86 for resctrl support Chen Yu
2026-10-14 2:58 ` [PATCH v9 03/12] x86/resctrl: Parse ACPI ERDT table and save CACD cpumask per RMD Chen Yu
2026-10-14 2:58 ` [PATCH v9 04/12] x86/resctrl: Do not enable ERDT when Sub-NUMA Cluster is enabled Chen Yu
2026-10-14 2:58 ` [PATCH v9 05/12] x86/resctrl: Attach ACPI ERDT information to L3 mon domain on CPU online Chen Yu
2026-10-14 2:59 ` [PATCH v9 06/12] x86,fs/resctrl: Move resctrl_arch_round_mon_val() out of line Chen Yu
2026-10-14 2:59 ` [PATCH v9 07/12] x86/resctrl: Add a global ERDT monitor scale Chen Yu
2026-10-14 2:59 ` [PATCH v9 08/12] x86/resctrl: Parse ACPI CMRC table Chen Yu
2026-10-14 3:00 ` [PATCH v9 09/12] x86/resctrl: Refactor the monitor read function Chen Yu
2026-10-14 3:00 ` [PATCH v9 10/12] fs/resctrl: Do not invoke smp_processor_id() in preemptible context Chen Yu
2026-10-14 3:00 ` [PATCH v9 11/12] x86/resctrl: Introduce erdt_cpu_has() and erdt_support() Chen Yu
2026-10-14 3:01 ` [PATCH v9 12/12] x86/resctrl: Add MMIO-based LLC occupancy monitoring support Chen Yu
2026-10-19 12:45 ` Chen Yu [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=atYQ_-VdsucficcN@three-body \
--to=chen.yu@linux.dev \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=fenghuay@nvidia.com \
--cc=hongyu.ning@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=reinette.chatre@intel.com \
--cc=tglx@kernel.org \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=yu.c.chen@intel.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®