[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <14df28f0-90b1-9c43-add5-08947165596d@intel.com>
Date: Fri, 21 Oct 2022 14:34:54 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: "Luck, Tony" <tony.luck@...el.com>,
James Morse <james.morse@....com>,
Peter Newman <peternewman@...gle.com>
CC: "Yu, Fenghua" <fenghua.yu@...el.com>,
"Eranian, Stephane" <eranian@...gle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"Babu Moger" <Babu.Moger@....com>,
Gaurang Upasani <gupasani@...gle.com>
Subject: Re: [RFD] resctrl: reassigning a running container's CTRL_MON group
Hi Tony,
On 10/21/2022 1:22 PM, Luck, Tony wrote:
>> I am not viewing this as "secretly-two-control-groups" - there would still be
>> only one parent CTRL_MON group that dictates all the allocations. MON groups already
>> have a CLOSID (PARTID) property but at this time it is always identical to the parent
>> CTRL_MON group. The difference introduced is that some of the child MON groups
>> may have a different CLOSID (PARTID) from the parent.
>
> What would be the resctrl file system operation to change the CLOSID of a child
> CTRL_MON group?
It could be both mv and mkdir
>
> I followed the "use rename" so the user would:
>
> # mv /sys/fs/resctrl/g1/mon_groups/work1 /sys/fs/resctrl/g2/mon_groups/
>
> to keep the same RMID, but move from "g1" to "g2" to get a different class of service.
Right. On a (RDT) system where RMIDs are independent from CLOSID then a move
like above would mean that MON group "work1" would keep its RMID and inherit the
CLOSID of CTRL_MON group "g2". On these systems a move like above is smooth
and after the move, CTRL_MON group "g2" and all MON groups within "g2" will
have the same CLOSID. The tasks within "work1" will run with new allocations
associated with CTRL_MON group "g2" while its monitoring counters remain
intact.
What I was responding to was the scenario where a (MPAM) system does
not have many PMGs (similar but different from RMID) and the
PMGs the system does have are dependent on the PARTID (MPAM's CLOSID).
Think about these systems as having counters in the hardware accessed as
CLOSID.RMID (PARTID.PMG), not "just" RMID, and "not many PMGs" may mean
one bit.
That brings two problems:
a) Monitoring counters are not moved "intact" since hardware will have data
for old PARTID.PMG pair while task has new PARTID.PMG.
b) Destination CTRL_MON group may not be able to accommodate new MON group
because of lack of local PMG.
The last few messages in this thread focuses on (b).
What Peter and I was wondering was whether resctrl could assign an available
PARTID to a new MON group with the new PARTID automatically inheriting the
allocation associated with the CTRL_MON group. The CTRL_MON group still dictates
the allocations but multiple PARTID (CLOSID) are used to enforce it. As a
reminder, the use case is that the user has two CTRL_MON groups and want
to have a large number of MON groups within each (one MON group per
container) with option to move a MON group from one CTRL_MON group
to another.
What we are considering is thus something like this (consider a system with
only two PMG bits but many PARTID):
# mkdir /sys/fs/resctrl/g1
/* CTRL_MON group "g1" gets CLOSID/PARTID = A and RMID/PMG = 0 */
# mkdir /sys/fs/resctrl/g1/mon_groups/m1
/* MON group "m1" gets CLOSID/PARTID = A and RMID/PMG = 1 */
At this point, due to lack of available PMG, it is not possible to create
a new MON group nor move any MON group to this CTRL_MON group.
The new idea is to support:
# mkdir /sys/fs/resctrl/g1/mon_groups/m2
or
# mv <source MON group> /sys/fs/resctrl/g1/mon_groups/m2
/* MON group "m2" gets PARTID = B (duplicate allocations of PARTID A) and PMG = 0 */
This is expected to be MPAM specific.
Reinette
Powered by blists - more mailing lists