From: Thomas Gleixner <tglx@linutronix.de>
To: David Carrillo-Cisneros <davidcc@google.com>
Cc: Stephane Eranian <eranian@google.com>,
"Luck, Tony" <tony.luck@intel.com>,
Vikas Shivappa <vikas.shivappa@linux.intel.com>,
"Shivappa, Vikas" <vikas.shivappa@intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"hpa@zytor.com" <hpa@zytor.com>,
"mingo@kernel.org" <mingo@kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"Shankar, Ravi V" <ravi.v.shankar@intel.com>,
"Yu, Fenghua" <fenghua.yu@intel.com>,
"Kleen, Andi" <andi.kleen@intel.com>
Subject: Re: [PATCH 1/1] x86/cqm: Cqm requirements
Date: Fri, 10 Mar 2017 15:53:32 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1703101523230.3681@nanos> (raw)
In-Reply-To: <CALcN6mjpuiy1mMn2KG33ororsf7e68AZYTmSjtpD9b-pitsY1g@mail.gmail.com>
On Thu, 9 Mar 2017, David Carrillo-Cisneros wrote:
> On Thu, Mar 9, 2017 at 3:01 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > On Wed, 8 Mar 2017, David Carrillo-Cisneros wrote:
> >> On Wed, Mar 8, 2017 at 12:30 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> >> > Same applies for per CPU measurements.
> >>
> >> For CPU measurements. We need perf-like CPU filtering to support tools
> >> that perform low overhead monitoring by polling CPU events. These
> >> tools approximate per-cgroup/task events by reconciling CPU events
> >> with logs of what job run when in what CPU.
> >
> > Sorry, but for CQM that's just voodoo analysis.
>
> I'll argue that. Yet, perf-like CPU is also needed for MBM, a less
> contentious scenario, I believe.
MBM is a different playground (albeit related due to the RMID stuff).
> It does not work well for a single run (your example). But for the
> example I gave, one can just rely on Random Sampling, Law of Large
> Numbers, and Central Limit Theorem.
Fine. So we need this for ONE particular use case. And if that is not well
documented including the underlying mechanics to analyze the data then this
will be a nice source of confusion for Joe User.
I still think that this can be done differently while keeping the overhead
small.
You look at this from the existing perf mechanics which require high
overhead context switching machinery. But that's just wrong because that's
not how the cache and bandwidth monitoring works.
Contrary to the other perf counters, CQM and MBM are based on a context
selectable set of counters which do not require readout and reconfiguration
when the switch happens.
Especially with CAT in play, the context switch overhead is there already
when CAT partitions need to be switched. So switching the RMID at the same
time is basically free, if we are smart enough to do an equivalent to the
CLOSID context switch mechanics and ideally combine both into a single MSR
write.
With that the low overhead periodic sampling can read N counters which are
related to the monitored set and provide N separate results. For bandwidth
the aggregation is a simple ADD and for cache residency it's pointless.
Just because perf was designed with the regular performance counters in
mind (way before that CQM/MBM stuff came around) does not mean that we
cannot change/extend that if it makes sense.
And looking at the way Cache/Bandwidth allocation and monitoring works, it
makes a lot of sense. Definitely more than shoving it into the current mode
of operandi with duct tape just because we can.
Thanks,
tglx
next prev parent reply other threads:[~2017-03-10 14:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-07 17:49 Vikas Shivappa
2017-03-07 19:31 ` Thomas Gleixner
2017-03-07 20:04 ` Luck, Tony
2017-03-07 20:22 ` Thomas Gleixner
2017-03-07 23:29 ` Stephane Eranian
2017-03-07 23:31 ` Shivappa Vikas
2017-03-08 8:30 ` Thomas Gleixner
2017-03-08 17:58 ` David Carrillo-Cisneros
2017-03-09 11:01 ` Thomas Gleixner
2017-03-09 18:05 ` David Carrillo-Cisneros
2017-03-10 14:53 ` Thomas Gleixner [this message]
2017-03-11 1:53 ` David Carrillo-Cisneros
2017-03-13 19:10 ` Thomas Gleixner
2017-03-13 19:58 ` David Carrillo-Cisneros
2017-03-13 20:21 ` Thomas Gleixner
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=alpine.DEB.2.20.1703101523230.3681@nanos \
--to=tglx@linutronix.de \
--cc=andi.kleen@intel.com \
--cc=davidcc@google.com \
--cc=eranian@google.com \
--cc=fenghua.yu@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=tony.luck@intel.com \
--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
all inboxes | Powered by JetHome®