[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181017183310.GB2603@hirez.programming.kicks-ass.net>
Date: Wed, 17 Oct 2018 20:33:10 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Song Liu <songliubraving@...com>
Cc: Alexey Budankov <alexey.budankov@...ux.intel.com>,
Ingo Molnar <mingo@...nel.org>,
lkml <linux-kernel@...r.kernel.org>,
"acme@...nel.org" <acme@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Stephane Eranian <eranian@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
"mark.rutland@....com" <mark.rutland@....com>,
"megha.dey@...el.com" <megha.dey@...el.com>,
"frederic@...nel.org" <frederic@...nel.org>
Subject: Re: [RFC][PATCH] perf: Rewrite core context handling
On Wed, Oct 17, 2018 at 07:19:55PM +0200, Peter Zijlstra wrote:
> On Wed, Oct 17, 2018 at 04:43:27PM +0000, Song Liu wrote:
>
> > > That makes task and cpu contexts wildly different, which will complicate
> > > matters I feel.
> > >
> >
> > I think we only need different logic when adding events to the task/cpu
> > contexts. The ctx_sched_in() and ctx_sched_out() will need some extra
> > logic to filter out events that are not being scheduled (don't schedule
> > events on PMU-a when rotating PMU-b). This logic will be the same for
> > task and cpu context. The difference is, the CPU context will not have
> > such events, because we never added such event to CPU context.
> >
> > Does this make sense? I could try draft a RFC to see how difficult it is.
>
> I'm not sure it saves much, if we have multiple per-cpu contexts we get
> to re-introduce the active_ctx_list and loose the simplification for the
> online status.
>
> Plus that fundamental assymetry -- which would bother my OCD forever
> more :-)
Worse, the whole syscall that installs the events will come apart. The
locking for the two cases is different :/
Powered by blists - more mailing lists