Fenghua Yu a0195f314a x86/resctrl: Don't move a task to the same resource group
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: e02737d5b826 ("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
2021-01-08 09:08:03 +01:00
..
2020-12-17 13:22:17 -08:00
2020-11-19 11:43:17 +01:00
2020-03-30 19:14:28 -07:00
2020-06-11 15:15:23 +02:00
2020-11-24 16:47:49 +01:00
2020-11-20 17:43:15 +01:00
2019-11-12 16:21:15 +01:00
2019-11-12 16:21:15 +01:00
2020-10-26 13:46:47 +01:00
2020-09-10 10:43:13 -05:00
2020-06-02 10:59:12 -07:00
2020-09-01 09:58:06 +02:00
2020-08-20 13:12:58 +02:00
2020-03-21 16:03:25 +01:00
2020-06-11 15:54:31 -07:00
2020-07-27 14:31:07 -04:00
2020-07-27 14:31:07 -04:00
2020-02-16 20:58:06 +01:00
2020-09-10 11:19:29 +02:00
2020-08-04 14:47:45 -07:00
2020-12-14 17:34:12 -08:00