lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 28 Jun 2010 17:29:26 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	paulus <paulus@...ba.org>,
	stephane eranian <eranian@...glemail.com>,
	Robert Richter <robert.richter@....com>,
	Will Deacon <will.deacon@....com>,
	Paul Mundt <lethal@...ux-sh.org>,
	Cyrill Gorcunov <gorcunov@...il.com>,
	Lin Ming <ming.m.lin@...el.com>,
	Yanmin <yanmin_zhang@...ux.intel.com>,
	Deng-Cheng Zhu <dengcheng.zhu@...il.com>,
	David Miller <davem@...emloft.net>,
	linux-kernel@...r.kernel.org
Subject: Re: [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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ