lkml.org 
[lkml]   [2015]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 1/3] perf: Tighten (and fix) the grouping condition
On Fri, Jan 23, 2015 at 03:02:12PM +0000, Mark Rutland wrote:
> On Fri, Jan 23, 2015 at 12:52:00PM +0000, Peter Zijlstra wrote:
> > The fix from 9fc81d87420d ("perf: Fix events installation during
> > moving group") was incomplete in that it failed to recognise that
> > creating a group with events for different CPUs is semantically
> > broken -- they cannot be co-scheduled.
> >
> > Furthermore, it leads to real breakage where, when we create an event
> > for CPU Y and then migrate it to form a group on CPU X, the code gets
> > confused where the counter is programmed -- triggered by the fuzzer.
> >
> > Fix this by tightening the rules for creating groups. Only allow
> > grouping of counters that can be co-scheduled in the same context.
> > This means for the same task and/or the same cpu.
>
> It seems this would still allow you to group CPU-affine software and
> uncore events, which also doesn't make sense: the software events will
> count on a single CPU while the uncore events aren't really CPU-affine.
>
> Which isn't anything against this patch, but probably something we
> should tighten up too.

Indeed, that would need a wee bit of extra infrastructure though; as we
cannot currently distinguish between regular cpuctx and uncore like
things.

Good spotting though.


\
 
 \ /
  Last update: 2015-01-23 16:21    [W:0.173 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site