OSDN Git Service

x86/intel_rdt: Initialize new resource group with sane defaults
authorReinette Chatre <reinette.chatre@intel.com>
Fri, 22 Jun 2018 22:41:59 +0000 (15:41 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 23 Jun 2018 11:03:42 +0000 (13:03 +0200)
commit95f0b77efa5749f19e7acfedcb8521da4b13ed0e
tree57932b58e37f1da85f4d7f76f8870c8d73269283
parent024d15be3855044faa8bddf829e3613961fd27ba
x86/intel_rdt: Initialize new resource group with sane defaults

Currently when a new resource group is created its allocations would be
those that belonged to the resource group to which its closid belonged
previously.

That is, we can encounter a case like:
mkdir newgroup
cat newgroup/schemata
L2:0=ff;1=ff
echo 'L2:0=0xf0;1=0xf0' > newgroup/schemata
cat newgroup/schemata
L2:0=0xf0;1=0xf0
rmdir newgroup
mkdir newnewgroup
cat newnewgroup/schemata
L2:0=0xf0;1=0xf0

When the new group is created it would be reasonable to expect its
allocations to be initialized with all regions that it can possibly use.
At this time these regions would be all that are shareable by other
resource groups as well as regions that are not currently used.
If the available cache region is found to be non-contiguous the
available region is adjusted to enforce validity.

When a new resource group is created the hardware is initialized with
these new default allocations.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: fenghua.yu@intel.com
Cc: tony.luck@intel.com
Cc: vikas.shivappa@linux.intel.com
Cc: gavin.hindman@intel.com
Cc: jithu.joseph@intel.com
Cc: dave.hansen@intel.com
Cc: hpa@zytor.com
Link: https://lkml.kernel.org/r/c468ed79340b63024111978e01430bb9589d85c0.1529706536.git.reinette.chatre@intel.com
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c