From: Peter Zijlstra <peterz@infradead.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: kan.liang@intel.com, mingo@redhat.com,
linux-kernel@vger.kernel.org, acme@kernel.org,
tglx@linutronix.de, alexander.shishkin@linux.intel.com,
vince@deater.net, eranian@google.com, andi@firstfloor.org
Subject: Re: [PATCH] perf/core: introduce context per CPU event list
Date: Thu, 10 Nov 2016 12:37:05 +0100 [thread overview]
Message-ID: <20161110113704.GU3142@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20161110110516.GA4418@leverpostej>
On Thu, Nov 10, 2016 at 11:05:17AM +0000, Mark Rutland wrote:
> Hi,
>
> On Thu, Nov 10, 2016 at 09:33:55AM +0100, Peter Zijlstra wrote:
> > Yes this is a problem, but no this cannot be done. We can't have per-cpu
> > storage per task. That rapidly explodes.
> >
> > Mark is looking at replacing this stuff with an rb-tree for big-little,
> > that would also allow improving this I think.
>
> Unfortunately I've not had the chance to look at that since returning
> from Plumbers. Also, I was leaning towards the alternative approach we
> discussed, with a perf_event_task_contexts container, as that also
> solved some other issues with the way we used perf_event_context::pmu in
> big.LITTLE systems.
>
> Looking at the way perf_iterate_ctx is used, it seems that we're just
> trying to iterate over the active events for a context (i.e. those
> programmed into the HW at this point in time). Though I'm missing some
> subtlety, since we check event->state < PERF_EVENT_STATE_INACTIVE.
>
> We have a similar issue with perf_event_task_tick() needing to know the
> relevant contexts, and for that we have the active_ctx_list. Can't we do
> something similar and add an active_events_list to perf_event_context?
So the problem is finding which events are active when.
If we stick all events in an RB-tree sorted on: {pmu,cpu,runtime} we
can, fairly easily, find the relevant subtree and limit the iteration.
Esp. if we use a threaded tree.
next prev parent reply other threads:[~2016-11-10 11:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 19:04 [PATCH] perf/core: introduce context per CPU event list kan.liang
2016-11-10 8:33 ` Peter Zijlstra
2016-11-10 11:05 ` Mark Rutland
2016-11-10 11:37 ` Peter Zijlstra [this message]
2016-11-10 12:04 ` Mark Rutland
2016-11-10 12:12 ` Peter Zijlstra
2016-11-10 12:26 ` Mark Rutland
2016-11-10 12:58 ` Peter Zijlstra
2016-11-10 14:10 ` Mark Rutland
2016-11-10 14:31 ` Liang, Kan
2016-11-10 16:26 ` Peter Zijlstra
2016-11-10 17:01 ` Mark Rutland
[not found] ` <1483302059-4334-1-git-send-email-davidcc@google.com>
2017-01-01 21:18 ` David Carrillo-Cisneros
2017-01-03 12:00 ` Mark Rutland
2017-01-04 0:39 ` David Carrillo-Cisneros
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=20161110113704.GU3142@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=eranian@google.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=vince@deater.net \
/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.