linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] x86/intel_rdt: Fix exclusive mode with CDP resources
@ 2018-09-26 18:59 Reinette Chatre
  2018-09-26 18:59 ` [PATCH 1/3] x86/intel_rdt: Introduce utility to obtain CDP peer Reinette Chatre
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Reinette Chatre @ 2018-09-26 18:59 UTC (permalink / raw)
  To: tglx, fenghua.yu, tony.luck
  Cc: jithu.joseph, gavin.hindman, dave.hansen, mingo, hpa, x86,
	linux-kernel, Reinette Chatre

Dear Maintainers,

CDP resources do not currently behave as expected when there are resource
groups with mode 'exclusive'.

In the example below it was possible to create two resource groups,
p1 and p2, that are both in exclusive mode but their usage of the
underlying L2 cache actually overlaps.

root@glk:/sys/fs/resctrl# ls
cpus  cpus_list  info  mode  p1  p2  schemata  size  tasks
root@glk:/sys/fs/resctrl# cat schemata
L2DATA:0=fff0
L2CODE:0=fff0
root@glk:/sys/fs/resctrl# cat mode
shareable

root@glk:/sys/fs/resctrl# cat p1/schemata
L2DATA:0=0003
L2CODE:0=000c
root@glk:/sys/fs/resctrl# cat p1/mode
exclusive

root@glk:/sys/fs/resctrl# cat p2/schemata
L2DATA:0=000c
L2CODE:0=0003
root@glk:/sys/fs/resctrl# cat p2/mode
exclusive

root@glk:/sys/fs/resctrl# cat info/L2CODE/bit_usage
0=SSSSSSSSSSSSEEEE
root@glk:/sys/fs/resctrl# cat info/L2DATA/bit_usage
0=SSSSSSSSSSSSEEEE
root@glk:/sys/fs/resctrl#

In the above example, the CBM of L2DATA in p1 overlaps with the CBM of
L2CODE in p2 while they are both in exclusive mode. While it may reflect no
overlap among the L2DATA resources specifically it does actually imply
overlap of use of the underlying hardware that is not the intention of
'exclusive' mode. This happens because the current implementation treats
L2CODE and L2DATA as totally independent, when it is actually referring to
the same underlying hardware.

This series fixes the potential for overlap of hardware resource use when
resource groups are in 'exclusive' mode by ensuring that if there is a CDP
peer on the same hardware then any overlap test would consider it also.

Allocations of data and code resources within the same exclusive resource
group are allowed to overlap.

Your feedback will be greatly appreciated.

Reinette

Reinette Chatre (3):
  x86/intel_rdt: Introduce utility to obtain CDP peer
  x86/intel_rdt: CBM overlap should also check for overlap with CDP peer
  x86/intel_rdt: Fix initial allocation to consider CDP

 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 133 ++++++++++++++++++++++-
 1 file changed, 128 insertions(+), 5 deletions(-)

-- 
2.17.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-10-03 19:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 18:59 [PATCH 0/3] x86/intel_rdt: Fix exclusive mode with CDP resources Reinette Chatre
2018-09-26 18:59 ` [PATCH 1/3] x86/intel_rdt: Introduce utility to obtain CDP peer Reinette Chatre
2018-10-03  6:46   ` Thomas Gleixner
2018-09-26 18:59 ` [PATCH 2/3] x86/intel_rdt: CBM overlap should also check for overlap with " Reinette Chatre
2018-10-03  7:02   ` Thomas Gleixner
2018-10-03 18:16     ` Reinette Chatre
2018-10-03 19:43       ` Thomas Gleixner
2018-10-03 19:51         ` Reinette Chatre
2018-09-26 18:59 ` [PATCH 3/3] x86/intel_rdt: Fix initial allocation to consider CDP Reinette Chatre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).