lkml.org 
[lkml]   [2018]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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 :/

\
 
 \ /
  Last update: 2018-10-17 20:34    [W:0.063 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site