]> git.baikalelectronics.ru Git - kernel.git/commit
x86/resctrl: Preserve CDP enable over CPU hotplug
authorJames Morse <james.morse@arm.com>
Fri, 21 Feb 2020 16:21:05 +0000 (16:21 +0000)
committerBorislav Petkov <bp@suse.de>
Fri, 17 Apr 2020 17:35:01 +0000 (19:35 +0200)
commita20968a4500dced6de1873b6a196b14fb6234830
tree1baece2c2f27fde5de61b47135062863a010985d
parent47c21fde93ab5a5475ef43b0b12aae336a7f325d
x86/resctrl: Preserve CDP enable over CPU hotplug

Resctrl assumes that all CPUs are online when the filesystem is mounted,
and that CPUs remember their CDP-enabled state over CPU hotplug.

This goes wrong when resctrl's CDP-enabled state changes while all the
CPUs in a domain are offline.

When a domain comes online, enable (or disable!) CDP to match resctrl's
current setting.

Fixes: a61c5dfeef54 ("x86/intel_rdt: Add basic resctrl filesystem support")
Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20200221162105.154163-1-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