linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Newman <peternewman@google.com>
To: James Morse <james.morse@arm.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>,
	Tony Luck <tony.luck@intel.com>,
	"Yu, Fenghua" <fenghua.yu@intel.com>,
	"Eranian, Stephane" <eranian@google.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Babu Moger <Babu.Moger@amd.com>,
	Gaurang Upasani <gupasani@google.com>
Subject: Re: [RFD] resctrl: reassigning a running container's CTRL_MON group
Date: Thu, 20 Oct 2022 12:39:08 +0200	[thread overview]
Message-ID: <CALPaoCgiwtvxZMJ6f-BOTNMPXDbMB8QM42HyCAvYRi4grPiphQ@mail.gmail.com> (raw)
In-Reply-To: <835d769b-3662-7be5-dcdd-804cb1f3999a@arm.com>

On Wed, Oct 19, 2022 at 3:58 PM James Morse <james.morse@arm.com> wrote:
> This isn't how MPAM is designed to be used. You'll hit nasty corners.
> The big one is the Cache Storage Utilisation counters.
>
> See 11.5.2 of the MPAM spec, "MSMON_CFG_CSU_CTL, MPAM Memory System Monitor Configure
> Cache Storage Usage Monitor Control Register". Not setting the MATCH_PARTID bit has this
> warning:
> | If MATCH_PMG is 1 and MATCH_PARTID is 0, it is CONSTRAINED UNPREDICTABLE whether the
> | monitor instance:
> | • Measures the storage used with matching PMG and with any PARTID.
> | • Measures no storage usage, that is, MSMON_CSU.VALUE is zero.
> | • Measures the storage used with matching PMG and PARTID, that is, treats
> | MATCH_PARTID as = 1
>
> 'constrained unpredictable' is arm's term for "portable software can't rely on this".
> The folk that designed MPAM don't believe "monitors would only match on PMGs" makes any
> sense. A PMG is not an RMID. A case in point is the system with only 1 PMG bit.
>
> I'm afraid this approach would preclude support for the llc_occupancy counter, and would
> artificially reduce the number of control groups that can be created as each control group
> needs an 'RMID'. On the machine with 1 PMG bit - you get 2 control groups, even though it
> has many more PARTID.

The first sentence of the Resource Monitoring chapter is also quite an
obstacle to my challenging to the PARTID-PMG hierarchy:

| Software environments may be labeled as belonging to a Performance
| Monitoring Group (PMG) within a partition.

It seems like the only real issue is that the user is responsible for
figuring out how best to make use of the available resources. But I seem
to recall that was the expectation with resctrl, so I should probably
stop trying to argue for expecting MPAM configurations which resemble
RDT.


> On 17/10/2022 11:15, Peter Newman wrote:
> > Provided that there are sufficient monitor
> > instances, there would never be any need to reprogram a monitor's
> > PMG.
>
> It sounds like this moves the problem to "make everything a monitor group because only
> monitor groups can be batch moved".
>
> If the tasks file could be moved between control and monitor groups, causing resctrl to
> relabel the tasks - would that solve more of the problem? (it eliminates the need to make
> everything a monitor group)

This was about preserving the RMID and memory bandwidth counts across a
CLOSID change. If the user is forced to conserve CTRL_MON groups due to
a limited number of CLOSIDs, keeping the various containers' tasks
separate is also a concern.

But if there's no need to conserve CTRL_MON groups, then there's no real
issue.

> The devil is in the detail, I'm not sure how it serialises with a fork()ing process, I'd
> hope to do better than relying on the kernel walking the list of processes a lot quicker
> than user-space can.

I wasn't planning to do it any more optimally than the rmdir
implementation today when looking for all tasks impacted by a
CLOSID/RMID deletion.

-Peter

  reply	other threads:[~2022-10-20 10:39 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-07 10:39 [RFD] resctrl: reassigning a running container's CTRL_MON group Peter Newman
2022-10-07 15:36 ` Reinette Chatre
2022-10-07 15:44   ` Yu, Fenghua
2022-10-07 17:28     ` Tony Luck
2022-10-10 23:35       ` Reinette Chatre
2022-10-12 11:21         ` Peter Newman
2022-10-12 16:55           ` James Morse
2022-10-17 10:15             ` Peter Newman
2022-10-19 13:57               ` James Morse
2022-10-20 10:39                 ` Peter Newman [this message]
2022-10-21 12:42                   ` Peter Newman
2022-10-25 15:55                     ` James Morse
2022-10-26  8:52                       ` Peter Newman
2022-10-26 21:12                         ` Reinette Chatre
2022-10-27  7:56                           ` Peter Newman
2022-10-27 17:35                             ` Reinette Chatre
2022-11-01 15:23                               ` Peter Newman
2022-11-01 15:53                                 ` Peter Newman
2022-11-01 16:48                                   ` Reinette Chatre
2022-10-25 15:56                   ` James Morse
2022-10-21 20:09                 ` Reinette Chatre
2022-10-21 20:22                   ` Luck, Tony
2022-10-21 21:34                     ` Reinette Chatre
2022-11-03 17:06                   ` James Morse
2022-11-08 21:28                     ` Reinette Chatre
2022-11-08 21:56                       ` Luck, Tony
2022-11-08 23:18                         ` Reinette Chatre
2022-11-09 17:58                           ` James Morse
2022-11-09  9:50                       ` Peter Newman
2022-11-09 19:11                         ` Reinette Chatre
2022-11-11 18:38                           ` James Morse
2022-11-14 18:02                             ` Reinette Chatre
2022-11-16 13:20                             ` Peter Newman
2022-11-09 17:59                       ` James Morse
2022-11-09 19:12                         ` Reinette Chatre
2022-11-11 18:36                           ` James Morse
2022-10-12 16:57           ` Yu, Fenghua
2022-10-12 17:23           ` Reinette Chatre
2022-10-14 12:56             ` James Morse
2022-10-19  9:08             ` Peter Newman
2022-10-19 13:20               ` James Morse
2022-10-19 23:54               ` Reinette Chatre
2022-10-20  8:48                 ` Peter Newman
2022-10-20 19:08                   ` Reinette Chatre
2022-10-21 10:09                     ` Peter Newman
2022-10-25 15:56                       ` James Morse
2022-10-25 15:55                     ` James Morse
2022-10-26  9:36                       ` Peter Newman
2022-11-03 17:06                         ` James Morse
2022-11-08 21:25                           ` Reinette Chatre
2022-10-07 17:57 ` Moger, Babu
2022-10-11 15:00   ` Stephane Eranian
2022-10-11 14:59 ` Stephane Eranian

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=CALPaoCgiwtvxZMJ6f-BOTNMPXDbMB8QM42HyCAvYRi4grPiphQ@mail.gmail.com \
    --to=peternewman@google.com \
    --cc=Babu.Moger@amd.com \
    --cc=eranian@google.com \
    --cc=fenghua.yu@intel.com \
    --cc=gupasani@google.com \
    --cc=james.morse@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    /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 NNTP newsgroup(s).