Linux-ARM-Kernel Archive mirror
 help / color / mirror / Atom feed
From: Amit Singh Tomar <amitsinght@marvell.com>
To: <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>
Cc: <fenghua.yu@intel.com>, <reinette.chatre@intel.com>,
	<james.morse@arm.com>, <gcherian@marvell.com>, <robh@kernel.org>,
	<peternewman@google.com>, <dfustini@baylibre.com>,
	<jonathan.cameron@huawei.com>,
	Amit Singh Tomar <amitsinght@marvell.com>
Subject: [PATCH v1 00/14] ARM: MPAM: add support for priority partitioning control
Date: Wed, 17 Jan 2024 19:43:51 +0530	[thread overview]
Message-ID: <20240117141405.3063506-1-amitsinght@marvell.com> (raw)

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2024-01-17 14:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17 14:13 Amit Singh Tomar [this message]
2024-01-17 14:13 ` [PATCH v1 01/14] fs/resctrl: group the resource control types for schemata list Amit Singh Tomar
2024-01-17 19:21   ` Peter Newman
2024-01-17 14:13 ` [PATCH v1 02/14] arm_mpam: resctrl: Detect priority partitioning capability Amit Singh Tomar
2024-01-17 14:13 ` [PATCH v1 03/14] arm_mpam: resctrl: extend the schemata list to support priority partition Amit Singh Tomar
2024-01-17 14:13 ` [PATCH v1 04/14] fs/resctrl: Set-up downstream priority partition resources Amit Singh Tomar
2024-01-17 14:13 ` [PATCH v1 05/14] fs/resctrl: fetch configuration based on control type Amit Singh Tomar
2024-01-17 14:13 ` [PATCH v1 06/14] arm_mpam: resctrl: Retrieve priority values from arch code Amit Singh Tomar
2024-01-17 14:13 ` [PATCH v1 07/14] fs/resctrl: Schemata write only for intended resource Amit Singh Tomar
2024-01-17 14:13 ` [PATCH v1 08/14] fs/resctrl: Extend schemata write for priority partition control Amit Singh Tomar
2024-01-17 14:14 ` [PATCH v1 09/14] fs/resctrl: set configuration based on Control type Amit Singh Tomar
2024-01-17 14:14 ` [PATCH v1 10/14] arm_mpam: resctrl: Facilitate writing downstream priority value Amit Singh Tomar
2024-01-17 14:14 ` [PATCH v1 11/14] arm_mpam: Fix Downstream and internal priority mask Amit Singh Tomar
2024-01-17 14:14 ` [PATCH v1 12/14] arm_mpam: Program Downstream priority value Amit Singh Tomar
2024-01-17 14:14 ` [PATCH v1 13/14] arm_mpam: Handle resource instances mapped to different controls Amit Singh Tomar
2024-01-17 18:03   ` Peter Newman
2024-01-19 13:01     ` [EXT] " Amit Singh Tomar
2024-01-19 22:05       ` Peter Newman
2024-05-08 13:55         ` Amit Singh Tomar
2024-01-17 14:14 ` [PATCH v1 14/14] arm64/mpam: resctrl: export DSPRI value to info directory Amit Singh Tomar
2024-01-17 23:59 ` [PATCH v1 00/14] ARM: MPAM: add support for priority partitioning control Reinette Chatre
  -- strict thread matches above, loose matches on Subject: below --
2024-01-17 14:12 Amit Singh Tomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240117141405.3063506-1-amitsinght@marvell.com \
    --to=amitsinght@marvell.com \
    --cc=dfustini@baylibre.com \
    --cc=fenghua.yu@intel.com \
    --cc=gcherian@marvell.com \
    --cc=james.morse@arm.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peternewman@google.com \
    --cc=reinette.chatre@intel.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).