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] [day] [month] [year] [list]
Message-ID: <20101019215642.GB28973@brick.ozlabs.ibm.com>
Date:	Wed, 20 Oct 2010 08:56:42 +1100
From:	Paul Mackerras <paulus@...ba.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	linux-kernel@...r.kernel.org,
	Alexey Kardashevskiy <aik@....ibm.com>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] perf, powerpc: Fix power_pmu_event_init to not use
 event->ctx

On Tue, Oct 19, 2010 at 01:50:30PM +0200, Peter Zijlstra wrote:

> On Tue, 2010-10-19 at 10:28 +0200, Peter Zijlstra wrote:
>  
> > > (The reason it needs to know whether it is a per-task event is because
> > > there are some hardware events on Power systems which only count when
> > > the processor is not idle, and there are some fixed-function counters
> > > which count such events.  For example, the "run cycles" event counts
> > > cycles when the processor is not idle.  If the user asks to count
> > > cycles, we can use "run cycles" if this is a per-task event, since the
> > > processor is running when the task is running, by definition.  We
> > > can't use "run cycles" if the user asks for "cycles" on a system-wide
> > > counter.)
> 
> Right, so the problem comes from you using run-cycles as cycles? How
> does that interact with things like cpu_relax() will that generate a
> difference in run-cycles vs cycles?

Cycles in cpu_relax() are still counted as run cycles.  Whether cycles
are considered "run" cycles or "idle" cycles is controlled by a bit in
an SPR that we set and clear in the idle loop and in the interrupt
entry code.  Only cycles when we're actually in the idle loop count as
"idle" cycles.

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