Re: [PATCH v1 3/9] x86/resctrl: Add resctrl_mbm_flush_cpu() to collect CPUs' MBM events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 16, 2023 at 4:18 PM Peter Newman <peternewman@xxxxxxxxxx> wrote:
> According to cpu_hotplug.rst, the startup callbacks are called before
> a CPU is started and the teardown callbacks are called after the CPU
> has become dysfunctional, so it should always be safe for a CPU to
> access its own data, so all I need to do here is avoid walking domain
> lists in resctrl_mbm_flush_cpu().
>
> However, this also means that resctrl_{on,off}line_cpu() call
> clear_closid_rmid() on a different CPU, so whichever CPU executes
> these will zap its own pqr_state struct and PQR_ASSOC MSR.

Sorry, I read the wrong section. I was looking at PREPARE section
callbacks. ONLINE callbacks are called on the CPU, so calling
clear_closid_rmid() is fine.

It says the offline callback is called from the per-cpu hotplug
thread, so I'm not sure if that means another context switch is
possible after the teardown handler has run. To be safe, I can make
resctrl_mbm_flush_cpu() check to see if it still has its domain state.

-Peter




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux