Re: [PATCH v3 5/6] fs/resctrl: Do not invoke smp_processor_id() in preemptible context

From: Chen, Yu C

Date: Mon Jun 08 2026 - 13:52:27 EST


Hi Tony,

On 6/8/2026 11:32 PM, Luck, Tony wrote:
On Mon, Jun 08, 2026 at 07:26:30PM +0800, Chen, Yu C wrote:
On 6/8/2026 4:36 PM, Thomas Gleixner wrote:
On Sat, Jun 06 2026 at 10:38, Chen Yu wrote:
From: Tony Luck <tony.luck@xxxxxxxxx>

__l3_mon_event_count() and __l3_mon_event_count_sum() call
smp_processor_id() to obtain the current CPU. However, some
monitor events can be read from any CPU in task context via
mon_event_count(); in that case the calling context is
preemptible and smp_processor_id() triggers a debug warning.

Is this new with this MMIO stuff or is this an existing issue? If the
latter then this patch should be in front of the series and get a fixes
tag. If not the change log should explain it.


It is an existing issue. I'll adjust the sequence and provide a fixes tag.
Thanks!

I don't think this is an existing issue. Before addition of MMIO
registers access is via the IA32_QM_EVTSEL and IA32_QM_CTR MSRs
which require access from a CPU on the same domain.


Thanks for pointing this out. Right, [PATCH 5/6] serves as a preparatory
patch to enable MMIO reads for RDT_RESOURCE_L3 within a preemptible context.
I had overlooked that any_cpu was set to false for RDT_RESOURCE_L3. any_cpu
will only be enabled for QOS_L3_OCCUP_EVENT_ID in [PATCH 6/6].

thanks,
Chenyu