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, 30 Aug 2010 14:27:44 +0100
From:	Matt Fleming <matt@...sole-pimps.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Zhang Rui <rui.zhang@...el.com>, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...e.hu>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Robert Richter <robert.richter@....com>,
	Lin Ming <ming.m.lin@...el.com>,
	Paul Mackerras <paulus@...ba.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Don Zickus <dzickus@...hat.com>,
	Cyrill Gorcunov <gorcunov@...il.com>,
	Len Brown <lenb@...nel.org>,
	Matthew Garrett <mjg59@...f.ucam.org>
Subject: Re: [RFC][PATCH 3/5] perf: Add hrtimer code for PMI-less hardware
 counters

On Mon, Aug 30, 2010 at 02:55:02PM +0200, Peter Zijlstra wrote:
> On Mon, 2010-08-30 at 13:13 +0100, Matt Fleming wrote:
> > Currently, it's impossible to periodically sample hardware counters that
> > lack performance monitoring interrupt (PMI) support. In order to sample
> > these counters we can create an event group which is backed by a
> > hrtimer, thereby simulating a PMI.
> > 
> > When the hrtimer goes off we sample the values in the hardware
> > counters. Because we obviously can't rely on the hrtimer going off at
> > exactly the sample period (say, every 1000 cache misses) the values need
> > to be weighted by the variable period since the last hrtimer went
> > off. This is so that we can compensate for the variability in hrtimer
> > period.
> > 
> > If perf record tries to create a sampling counter and the hardware
> > doesn't support it then we'll fall back to creating an event group with
> > a hrtimer.
> 
> 
> Why is this changing kernel code?
> 
> You can create those groups in userspace..

I'm lost. Is it possible to do this patch entirely in userspace? How do
we periodically sample the counters if it's not being done in the
kernel?
--
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