]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/resctrl: Add domain online callback for resctrl work
authorJames Morse <james.morse@arm.com>
Fri, 2 Sep 2022 15:48:11 +0000 (15:48 +0000)
committerBorislav Petkov <bp@suse.de>
Thu, 22 Sep 2022 13:13:27 +0000 (15:13 +0200)
commit3a7232cdf19e39e7f24c493117b373788b348af2
tree724127a5f4e7165572291b0ae08f81dde158da9f
parentbab6ee736873becc0216ba5fd159394e272d01b2
x86/resctrl: Add domain online callback for resctrl work

Because domains are exposed to user-space via resctrl, the filesystem
must update its state when CPU hotplug callbacks are triggered.

Some of this work is common to any architecture that would support
resctrl, but the work is tied up with the architecture code to
allocate the memory.

Move domain_setup_mon_state(), the monitor subdir creation call and the
mbm/limbo workers into a new resctrl_online_domain() call. These bits
are not specific to the architecture. Grouping them in one function
allows that code to be moved to /fs/ and re-used by another architecture.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Jamie Iles <quic_jiles@quicinc.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@fujitsu.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Tested-by: Xin Hao <xhao@linux.alibaba.com>
Tested-by: Shaopeng Tan <tan.shaopeng@fujitsu.com>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20220902154829.30399-4-james.morse@arm.com
arch/x86/kernel/cpu/resctrl/core.c
arch/x86/kernel/cpu/resctrl/internal.h
arch/x86/kernel/cpu/resctrl/rdtgroup.c
include/linux/resctrl.h