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]
Message-ID: <20111122105625.GC2557@redhat.com>
Date:	Tue, 22 Nov 2011 12:56:25 +0200
From:	Gleb Natapov <gleb@...hat.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH RFC] perf, core: disable pmu while context rotation only
 if needed

Hi Peter,

On Tue, Nov 15, 2011 at 01:55:18PM +0100, Peter Zijlstra wrote:
> On Tue, 2011-11-15 at 14:38 +0200, Gleb Natapov wrote:
> > On Tue, Nov 15, 2011 at 01:07:13PM +0100, Peter Zijlstra wrote:
> > > On Tue, 2011-11-15 at 13:34 +0200, Gleb Natapov wrote:
> > > > 
> > > > Currently pmu is disabled and re-enabled on each timer interrupt even
> > > > when no rotation or frequency adjustment is needed. On Intel CPU this
> > > > results in two writes into PERF_GLOBAL_CTRL MSR per tick. On bare metal
> > > > it does not cause significant slowdown, but when running perf in a virtual
> > > > machine it leads to 20% slowdown on my machine.
> > > 
> > > 
> > > I detest asymmetric locking like that, does something like the below
> > > also work for you?
> > > 
> > It does.
> 
> ok, great.
> 
> > >  
> > > +	if (!rotate && !freq)
> > > +		goto done;
> > > +
> > >  	perf_ctx_lock(cpuctx, cpuctx->task_ctx);
> > >  	perf_pmu_disable(cpuctx->ctx.pmu);
> > > +
> > > +	if (!freq)
> > > +		goto rotate;
> > > +
> > Why goto, why not
> > 
> > 	if (freq) {
> > >  	perf_ctx_adjust_freq(&cpuctx->ctx, interval);
> > >  	if (ctx)
> > >  		perf_ctx_adjust_freq(ctx, interval);
> >         }
> > 
> > And the same with next goto.
> 
> Because, uhm,. dunno. Let me make that if()s and commit the thing.
> Thanks!
Have you committed it somewhere? I do not see it in tip.git, but may be
I am looking in a wrong place.

--
			Gleb.
--
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