From: "Luck, Tony" <tony.luck@intel.com>
To: David Carrillo-Cisneros <davidcc@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Vikas Shivappa <vikas.shivappa@linux.intel.com>,
"Shivappa, Vikas" <vikas.shivappa@intel.com>,
Stephane Eranian <eranian@google.com>,
linux-kernel <linux-kernel@vger.kernel.org>, x86 <x86@kernel.org>,
"hpa@zytor.com" <hpa@zytor.com>, Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
"Shankar, Ravi V" <ravi.v.shankar@intel.com>,
"Yu, Fenghua" <fenghua.yu@intel.com>,
"Kleen, Andi" <andi.kleen@intel.com>,
"Anvin, H Peter" <h.peter.anvin@intel.com>
Subject: Re: [PATCH 00/12] Cqm2: Intel Cache quality monitoring fixes
Date: Fri, 3 Feb 2017 14:24:51 -0800 [thread overview]
Message-ID: <20170203222449.GA12894@intel.com> (raw)
In-Reply-To: <CALcN6miQVL1sEw_DG7XT=4PQBXYKW7TKEX15Qd9EQc0Pr5Qigw@mail.gmail.com>
On Fri, Feb 03, 2017 at 01:08:05PM -0800, David Carrillo-Cisneros wrote:
> On Fri, Feb 3, 2017 at 9:52 AM, Luck, Tony <tony.luck@intel.com> wrote:
> > On Thu, Feb 02, 2017 at 06:14:05PM -0800, David Carrillo-Cisneros wrote:
> >> If we tie allocation groups and monitoring groups, we are tying the
> >> meaning of CPUs and we'll have to choose between the CAT meaning or
> >> the perf meaning.
> >>
> >> Let's allow semantics that will allow perf like monitoring to
> >> eventually work, even if its not immediately supported.
> >
> > Would it work to make monitor groups be "task list only" or "cpu mask only"
> > (unlike control groups that allow mixing).
>
> That works, but please don't use chmod. Make it explicit by the group
> position (i.e. mon/cpus/grpCPU1, mon/tasks/grpTasks1).
I had been thinking that after writing a PID to "tasks" we'd disallow
writes to "cpus". But is sounds nicer for the user to declare their
intention upfront. Counter propsosal in the naming war:
.../monitor/bytask/{groupname}
.../monitor/bycpu/{groupname}
> > Then the intel_rdt_sched_in() code could pick the RMID in ways that
> > give you the perf(1) meaning. I.e. if you create a monitor group and assign
> > some CPUs to it, then we will always load the RMID for that monitor group
> > when running on those cpus, regardless of what group(s) the current process
> > belongs to. But if you didn't create any cpu-only monitor groups, then we'd
> > assign RMID using same rules as CLOSID (so measurements from a control group
> > would track allocation policies).
>
> I think that's very confusing for the user. A group's observed
> behavior should be determined by its attributes and not change
> depending on how other groups are configured. Think on multiple users
> monitoring simultaneously.
>
> >
> > We are already planning that creating monitor only groups will change
> > what is reported in the control group (e.g. you pull some tasks out of
> > the control group to monitor them separately, so the control group only
> > reports the tasks that you didn't move out for monitoring).
>
> That's also confusing, and the work-around that Vikas proposed of two
> separate files to enumerate tasks (one for control and one for
> monitoring) breaks the concept of a task group.
There are some simple cases where we can make the data shown in the
original control group look the same. E.g. we move a few tasks over to a
/bytask/ group (or several groups if we want a very fine breakdown) and
then have the report from the control group sum the RMIDs from the monitor
groups and add to the total from the native RMID of the control group.
But this falls apart if the user asks a single monitor group to monitor
tasks from multiple control groups. Perhaps we could disallow this
(when we assign the first task to a monitor group, capture the CLOSID
and then only allow other tasks with the same CLOSID to be added ... unless
the group becomes empty, and which point we can latch onto a new CLOSID).
/bycpu/ monitoring is very resource intensive if we have to preserve
the control group reports. We'd need to allocate MAXCLOSID[1] RMIDs for
each group so that we can keep separate counts for tasks from each
control group that run on our CPUs and then sum them to report the
/bycpu/ data (instead of just one RMID, and no math). This also
puts more memory references into the sched_in path while we
figure out which RMID to load into PQR_ASSOC.
I'd want to warn the user in the Documentation that splitting off
too many monitor groups from a control group will result in less
than stellar accuracy in reporting as the kernel cannot read
multiple RMIDs atomically and data is changing between reads.
> I know the present implementation scope is limited, so you could:
> - support 1) and/or 2) only
> - do a simple RMID management (e.g. same RMID all packages, allocate
> RMID on creation or fail)
> - do the custom fs based tool that Vikas mentioned instead of using
> perf_event_open (if it's somehow easier to build and maintain a new
> tool rather than reuse perf(1) ).
>
> any or all of the above are fine. But please don't choose group
> semantics that will prevent us from eventually supporting full
> perf-like behavior or that we already know explode in user's face.
I'm trying hard to find a way to do this. I.e. start with a patch
that has limited capabilities and needs a custom tool, but can later
grow into something that meets your needs.
-Tony
[1] Lazy allocation means finding we can't find a free RMID in the
middle of context switch ... not willing to go there.
next prev parent reply other threads:[~2017-02-03 22:24 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 21:59 [PATCH 00/12] Cqm2: Intel Cache quality monitoring fixes Vikas Shivappa
2017-01-06 21:59 ` [PATCH 01/12] Documentation, x86/cqm: Intel Resource Monitoring Documentation Vikas Shivappa
2017-01-06 21:59 ` [PATCH 02/12] x86/cqm: Remove cqm recycling/conflict handling Vikas Shivappa
2017-01-06 21:59 ` [PATCH 03/12] x86/rdt: Add rdt common/cqm compile option Vikas Shivappa
2017-01-16 18:05 ` Thomas Gleixner
2017-01-17 17:25 ` Shivappa Vikas
2017-01-06 21:59 ` [PATCH 04/12] x86/cqm: Add Per pkg rmid support Vikas Shivappa
2017-01-16 18:15 ` [PATCH 04/12] x86/cqm: Add Per pkg rmid support\ Thomas Gleixner
2017-01-17 19:11 ` Shivappa Vikas
2017-01-06 21:59 ` [PATCH 05/12] x86/cqm,perf/core: Cgroup support prepare Vikas Shivappa
2017-01-17 12:11 ` Thomas Gleixner
2017-01-17 12:31 ` Peter Zijlstra
2017-01-18 2:14 ` Shivappa Vikas
2017-01-17 13:46 ` Thomas Gleixner
2017-01-17 20:22 ` Shivappa Vikas
2017-01-17 21:31 ` Thomas Gleixner
2017-01-17 15:26 ` Peter Zijlstra
2017-01-17 20:27 ` Shivappa Vikas
2017-01-06 21:59 ` [PATCH 06/12] x86/cqm: Add cgroup hierarchical monitoring support Vikas Shivappa
2017-01-17 14:07 ` Thomas Gleixner
2017-01-06 22:00 ` [PATCH 07/12] x86/rdt,cqm: Scheduling support update Vikas Shivappa
2017-01-17 21:58 ` Thomas Gleixner
2017-01-17 22:30 ` Shivappa Vikas
2017-01-06 22:00 ` [PATCH 08/12] x86/cqm: Add support for monitoring task and cgroup together Vikas Shivappa
2017-01-17 16:11 ` Thomas Gleixner
2017-01-06 22:00 ` [PATCH 09/12] x86/cqm: Add RMID reuse Vikas Shivappa
2017-01-17 16:59 ` Thomas Gleixner
2017-01-18 0:26 ` Shivappa Vikas
2017-01-06 22:00 ` [PATCH 10/12] perf/core,x86/cqm: Add read for Cgroup events,per pkg reads Vikas Shivappa
2017-01-06 22:00 ` [PATCH 11/12] perf/stat: fix bug in handling events in error state Vikas Shivappa
2017-01-06 22:00 ` [PATCH 12/12] perf/stat: revamp read error handling, snapshot and per_pkg events Vikas Shivappa
2017-01-17 17:31 ` [PATCH 00/12] Cqm2: Intel Cache quality monitoring fixes Thomas Gleixner
2017-01-18 2:38 ` Shivappa Vikas
2017-01-18 8:53 ` Thomas Gleixner
2017-01-18 9:56 ` Peter Zijlstra
2017-01-19 19:59 ` Shivappa Vikas
2017-01-18 19:41 ` Shivappa Vikas
2017-01-18 21:03 ` David Carrillo-Cisneros
2017-01-19 17:41 ` Thomas Gleixner
2017-01-20 7:37 ` David Carrillo-Cisneros
2017-01-20 8:30 ` Thomas Gleixner
2017-01-20 20:27 ` David Carrillo-Cisneros
2017-01-18 21:16 ` Yu, Fenghua
2017-01-19 2:09 ` David Carrillo-Cisneros
2017-01-19 16:58 ` David Carrillo-Cisneros
2017-01-19 17:54 ` Thomas Gleixner
2017-01-19 2:21 ` Vikas Shivappa
2017-01-19 6:45 ` Stephane Eranian
2017-01-19 18:03 ` Thomas Gleixner
2017-01-20 2:32 ` Vikas Shivappa
2017-01-20 7:58 ` David Carrillo-Cisneros
2017-01-20 13:28 ` Thomas Gleixner
2017-01-20 20:11 ` David Carrillo-Cisneros
2017-01-20 21:08 ` Shivappa Vikas
2017-01-20 21:44 ` David Carrillo-Cisneros
2017-01-20 23:51 ` Shivappa Vikas
2017-02-08 10:13 ` Peter Zijlstra
2017-01-23 9:47 ` Thomas Gleixner
2017-01-23 11:30 ` Peter Zijlstra
2017-02-01 20:08 ` Luck, Tony
2017-02-01 23:12 ` David Carrillo-Cisneros
2017-02-02 17:39 ` Luck, Tony
2017-02-02 19:33 ` Luck, Tony
2017-02-02 20:20 ` Shivappa Vikas
2017-02-02 20:22 ` David Carrillo-Cisneros
2017-02-02 23:41 ` Luck, Tony
2017-02-03 1:40 ` David Carrillo-Cisneros
2017-02-03 2:14 ` David Carrillo-Cisneros
2017-02-03 17:52 ` Luck, Tony
2017-02-03 21:08 ` David Carrillo-Cisneros
2017-02-03 22:24 ` Luck, Tony [this message]
2017-02-07 8:08 ` Stephane Eranian
2017-02-07 18:52 ` Luck, Tony
2017-02-08 19:31 ` Stephane Eranian
2017-02-07 20:10 ` Shivappa Vikas
2017-02-17 13:41 ` Thomas Gleixner
2017-02-06 18:54 ` Luck, Tony
2017-02-06 21:22 ` Luck, Tony
2017-02-06 21:36 ` Shivappa Vikas
2017-02-06 21:46 ` David Carrillo-Cisneros
2017-02-06 22:16 ` David Carrillo-Cisneros
2017-02-06 23:27 ` Luck, Tony
2017-02-07 0:33 ` David Carrillo-Cisneros
2017-02-02 0:35 ` Andi Kleen
2017-02-02 1:12 ` David Carrillo-Cisneros
2017-02-02 1:19 ` Andi Kleen
2017-02-02 1:22 ` Yu, Fenghua
2017-02-02 17:51 ` Shivappa Vikas
2017-02-08 10:11 ` Peter Zijlstra
2017-01-20 20:40 ` Shivappa Vikas
2017-01-20 19:31 ` 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=20170203222449.GA12894@intel.com \
--to=tony.luck@intel.com \
--cc=andi.kleen@intel.com \
--cc=davidcc@google.com \
--cc=eranian@google.com \
--cc=fenghua.yu@intel.com \
--cc=h.peter.anvin@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=ravi.v.shankar@intel.com \
--cc=tglx@linutronix.de \
--cc=vikas.shivappa@intel.com \
--cc=vikas.shivappa@linux.intel.com \
--cc=x86@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