From: Peter Zijlstra <peterz@infradead.org>
To: William Cohen <wcohen@redhat.com>
Cc: paulus@samba.org, Don Domingo <ddomingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: Perf event operation with hotplug cpus and cgroups
Date: Fri, 20 Mar 2015 20:22:45 +0100 [thread overview]
Message-ID: <20150320192245.GW2896@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <550C70AF.8020304@redhat.com>
On Fri, Mar 20, 2015 at 03:10:39PM -0400, William Cohen wrote:
> cgroup monitoring
>
> The cgroup monitoring is built on the perf event per cpu monitoring.
> If the cgroup is not pinned to a particular set of processors, then
> systemwide monitoring for that cgroup needs to be done and a perf
> event open is needed for every cpu in the system.
> The issue with this
> approach is if the cgroups are used for virtual machine guests where
> each cgroup is allocated a single processor, the number of cgroups is
> proportional to the number of processors in the machine. The number
> of files that need to be opened to monitor the cgroups on the system
> is O(cpus^2).
That's what you get for doing silly thing like that, isn't it. Why would
you create a cgroup per vcpu and then measure that cgroup if you're
interested in the whole virtual machine?
Just measure the parent cgroup of the vcpu cgroups if you're really only
interested in the virtual machine crap thing.
> Given the issues with these uses cases is user-space setting up the
> counters for each cpu in the system the best solution? Would it be
> better to to allow the system-wide data collection to selected with
> one perf event open with pid==-1 and cpu==-1? Is setup of per cpu
> monitoring and aggregation of the counters across processors too
> difficult to do in the kernel?
Not hard at all, but useless, you need a fd per cpu in order to get your
data out. Remember that the ring buffers are strictly per cpu.
next prev parent reply other threads:[~2015-03-20 19:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-20 19:10 Perf event operation with hotplug cpus and cgroups William Cohen
2015-03-20 19:22 ` Peter Zijlstra [this message]
2015-03-20 19:41 ` William Cohen
2015-03-20 20:20 ` Peter Zijlstra
2015-03-23 16:02 ` William Cohen
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=20150320192245.GW2896@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=ddomingo@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=wcohen@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.