lkml.org 
[lkml]   [2010]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 05/11] perf: register pmu implementations
On Mon, Jun 28, 2010 at 05:16:37PM +0200, Peter Zijlstra wrote:
> > > }
> > > + srcu_read_unlock(&pmus_srcu, idx);
> > >
> > > return pmu;
> > > }
> >
> >
> >
> > I'm still not sure why all this locking is needed. We don't even
> > support pmus in modules.
> >
> > Is there something coming soon that will use this?
> > I remember something about KVM.
>
> Possibly, not sure. We could put the unregister thing in a later patch,
> but I wanted to make sure it was sanely possibly and its only a few
> lines of code.



Ok.


> > And who will have to use srcu? It seems the event fastpath would
> > be concerned, right? Will that have an impact on the performances?
>
> Only event creation like above (perf_init_event) will have to use SRCU,
> so not really a hot path.



Ah I see. The event itself is synchronized against the fast-path using rcu.
And then pmus themselves would be synchronized against events. Right
that makes sense.

But then why RCU (or SRCU, whatever)? I mean parent event creation is
quite rare. And child events won't need to be synchronized as far as the parent
keeps a reference to the pmu.



\
 
 \ /
  Last update: 2010-06-28 17:31    [W:0.288 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site