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: <20151218114751.GP6344@twins.programming.kicks-ass.net>
Date:	Fri, 18 Dec 2015 12:47:51 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	"Suzuki K. Poulose" <Suzuki.Poulose@....com>
Cc:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	mark.rutland@....com, punit.agrawal@....com, arm@...nel.org
Subject: Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions

On Fri, Dec 18, 2015 at 10:58:17AM +0000, Suzuki K. Poulose wrote:

> We have a global Enable/Disable for CCI PMU and thats what we use
> currently. To be able to reprogram the counters with the event period
> (we program the counter with a specific count in pmu::start() and at
> overflow irq handler, not to be confused with the sampling period, which
> is not supported), we need to be sure that the counter value has been updated.
> 
> May be we could check the event->hw->state to see if we need to reprogram it.

Right, have a look at arch/x86/kernel/cpu/perf_event.c:x86_pmu_enable()

If there's new events, it does two loops over the events.

The first loop does stop(PERF_EF_UPDATE) any counter that got moved.
The second loop does start(PERF_EF_RELOAD) on moved and new events.

The PERF_HES_ARCH bit is used to preserve the stopped state of counters
that were programmed but temporarily stopped.
--
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