1
0
Fork 0
alistair23-linux/arch/x86/kernel/cpu/resctrl
Fenghua Yu bb039d45eb x86/resctrl: Don't move a task to the same resource group
commit a0195f314a upstream

Shakeel Butt reported in [1] that a user can request a task to be moved
to a resource group even if the task is already in the group. It just
wastes time to do the move operation which could be costly to send IPI
to a different CPU.

Add a sanity check to ensure that the move operation only happens when
the task is not already in the resource group.

[1] https://lore.kernel.org/lkml/CALvZod7E9zzHwenzf7objzGKsdBmVwTgEJ0nPgs0LUFU3SN5Pw@mail.gmail.com/

Fixes: e02737d5b8 ("x86/intel_rdt: Add tasks files")
Reported-by: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/962ede65d8e95be793cb61102cca37f7bb018e66.1608243147.git.reinette.chatre@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-17 14:05:34 +01:00
..
Makefile x86/resctrl: Avoid confusion over the new X86_RESCTRL config 2019-02-02 10:34:52 +01:00
core.c x86/resctrl: Fix memory bandwidth counter width for AMD 2020-07-09 09:37:57 +02:00
ctrlmondata.c x86/resctrl: Prevent NULL pointer dereference when reading mondata 2019-11-03 17:51:22 +01:00
internal.h x86/resctrl: Remove unused struct mbm_state::chunks_bw 2020-12-21 13:27:07 +01:00
monitor.c x86/resctrl: Fix incorrect local bandwidth when mba_sc is enabled 2020-12-21 13:27:07 +01:00
pseudo_lock.c Merge branch 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-07-08 17:25:53 -07:00
pseudo_lock_event.h x86/resctrl: Rename and move rdt files to a separate directory 2018-11-22 20:16:18 +01:00
rdtgroup.c x86/resctrl: Don't move a task to the same resource group 2021-01-17 14:05:34 +01:00