[PATCH v1 00/14] ARM: MPAM: add support for priority partitioning control

Amit Singh Tomar amitsinght at marvell.com
Wed Jan 17 06:12:43 PST 2024


This patch-set is continuation to the RFC[1], we sent last year. The patches
that we sent earlier, embed the DSPRI (Downstream priority) value into already
existing schemata file, which is used to configure CAT (Cache Allocation Technology)
capabilities. For instance, in order to configure Downstream priority, DSPRI
value is passed in following way:

echo L3:0=ffff,a > schemata, where "a" dspri value, and ffff cache portion bitmaps.

But instead of using already existing, "L3" schemata, we can have new schemata
that is dedicated to this new/extended priority control (at the moment, extended
control is limited to only DSPRI but we can put new/more control same way). For
instance, this version uses new schemata L3DSPRI, and following is the way
to configure downstream priority value.

echo L3DSPRI:0=a > schemata, where "a" is dspri value.

Overall, the schemata for a system that support all these controls looks like:

MB:0=100
L3DSPRI:0=f
L3:0=ffff

and this approach aids in code decluttering, for instance, we don't have to 
really care about dspri flags (dspri_store, dspri_show, used in RFC version).

To help creating new schemata, Patch(1/14) is introduced (new one), It
basically divide the resource control type into two groups, and map it
to list of schemata(s).

"SCHEMA_BASIC" type is for already exiting schemata ("L3", and "MB") used
to configure features like CAT (Cache Allocation Technology), and MBA
(Memory Bandwidth Allocation).

"SCHEMA_DSPRI" type is for schemata (L3DSPRI), and used to configure
Downstream priority values. This is used in patch (3/14) when the
schemata list is extended to support priority partition control.

Took this idea from openEuler Kernel[1], pointed by Jonathan in previous discussion.

This division into groups help in configuring resource control of different
types based on control types (patch 6/14, and patch 8/14).

For now, patch (5/14), and (9/14) is split for easy review, eventually these
get squashed.

Patch (12/14) is reworked, and now priority value is inverted based on
DSPRI_0_IS_LOW value.

Patch(14/14) is a new patch, that export Maximum DSPRI value to resctrl's info
directory.

At the moment, these patches are restricted to support only the Downstream priority
control, but if this approach looks okay, can have support for both the priority controls
in next variant.

Also, these patches[3] are still based on older MPAM tree[3] from James, as facing some
trouble setting up the resource control with latest snapshots.

[1]: https://lore.kernel.org/lkml/20230901141731.00006f46@Huawei.com/T/
[2]: https://github.com/openeuler-mirror/kernel/commit/8139268b70398c37843a38bf8c7b243ad1f20c97
[3]: https://github.com/Amit-Radur/linux/commit/71ac4cca1eccb831ce04d3094f0cf794fc9d2d72
[4]: https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/log/?h=mpam/snapshot/v6.2

Amit Singh Tomar (14):
  fs/resctrl: group the resource control types for schemata list
  arm_mpam: resctrl: Detect priority partitioning capability
  arm_mpam: resctrl: extend the schemata list to support priority
    partition
  fs/resctrl: Set-up downstream priority partition resources
  fs/resctrl: fetch configuration based on control type
  arm_mpam: resctrl: Retrieve priority values from arch code
  fs/resctrl: Schemata write only for intended resource
  fs/resctrl: Extend schemata write for priority partition control
  fs/resctrl: set configuration based on Control type
  arm_mpam: resctrl: Facilitate writing downstream priority value
  arm_mpam: Fix Downstream and internal priority mask
  arm_mpam: Program Downstream priority value
  arm_mpam: Handle resource instances mapped to different controls
  arm64/mpam: resctrl: export DSPRI value to info directory

 arch/x86/kernel/cpu/resctrl/ctrlmondata.c |   9 +-
 drivers/platform/mpam/mpam_devices.c      |  72 +++++++++++----
 drivers/platform/mpam/mpam_internal.h     |   1 +
 drivers/platform/mpam/mpam_resctrl.c      |  81 +++++++++++++----
 fs/resctrl/ctrlmondata.c                  |  74 +++++++++++++--
 fs/resctrl/monitor.c                      |   6 +-
 fs/resctrl/rdtgroup.c                     | 105 ++++++++++++++++++----
 include/linux/resctrl.h                   |  19 +++-
 include/linux/resctrl_types.h             |   9 ++
 9 files changed, 309 insertions(+), 67 deletions(-)

-- 
2.25.1




More information about the linux-arm-kernel mailing list