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]
Date:	Mon, 21 Nov 2011 23:05:11 +0100
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Vince Weaver <vweaver1@...s.utk.edu>
Cc:	Stephane Eranian <eranian@...gle.com>, mingo@...hat.com,
	hpa@...or.com, linux-kernel@...r.kernel.org, tglx@...utronix.de,
	mingo@...e.hu
Subject: Re: [tip:perf/urgent] perf/x86: Enable raw event access to Intel
 offcore events

On Mon, 2011-11-21 at 16:04 -0500, Vince Weaver wrote:

> The PAPI code currently uses FORMAT_GROUP and puts as many events as 
> possible in a group.  The way we maximize events in a group is to
> add events until perf_events indicates a failure.
> 
> When NMI watchdog is enabled, a counter is stolen.  Yet the perf_events
> code does not account for this.
> 
> So say on an AMD machine with 4 counters (3 after one is stolen) 
> perf_events lets you add 4 events to an event group, even though only 3 
> are available.  It does not report failure upon open or start, only at 
> read.  By then it's too late.
> 
> We have to work around this, by doing an extra read at open time to verify 
> that the event group actually is valid, adding overhead.

So strictly speaking this is a starvation case, we create a group that
requires the entire PMU but then run a higher priority event that won't
yield resulting in the group never getting scheduled.

Now fully agreed that starvation sucks, but I'm not exactly sure what to
do about it.

What isn't helping either is that all this scheduling code is per
arch :/
--
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