Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1525312

Re: [PATCH] perf/x86/uncore: Allow single pmu/box within events group

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] perf/x86/uncore: Allow single pmu/box within events group
Date 2016-11-18 14:30 +0100
Message-ID <sERoS-7Cf-13@gated-at.bofh.it> (permalink)
References <sEF4l-7Yr-13@gated-at.bofh.it> <sEPwK-6s7-37@gated-at.bofh.it> <sEQCu-75C-39@gated-at.bofh.it> <sEQVQ-7dC-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Nov 18, 2016 at 01:53:54PM +0100, Peter Zijlstra wrote:
> On Fri, Nov 18, 2016 at 01:33:25PM +0100, Jiri Olsa wrote:
> > On Fri, Nov 18, 2016 at 12:28:50PM +0100, Peter Zijlstra wrote:
> > > On Fri, Nov 18, 2016 at 01:15:28AM +0100, Jiri Olsa wrote:
> > > > Current uncore_validate_group code expects all events within
> > > > the group to have same pmu.
> > > > 
> > > > This leads to constraint code using wrong boxes which leads
> > > > in my case to touching uninitialized spinlocks, but could
> > > > be probably worse.. depends on type and box details.
> > > > 
> > > > I get lockdep warning below for following perf stat:
> > > >   # perf stat -vv -e '{uncore_cbox_0/config=0x0334/,uncore_qpi_0/event=1/}' -a sleep 1
> > > 
> > > Hurm, we shouldn't be allowing that in the first place I think.
> > > 
> > > 
> > > Let me stare at the generic group code, the intent was to only allow
> > > software events to mix with hw events, nothing else.
> > 
> > yep, that's what's happening now.. but after the event_init callback
> 
> Ah yes indeed. Its the is_uncore_event() test in uncore_collect_event()
> that's too lenient, that allows us to mix events from various uncore
> boxes.
> 
> Would something like so fix things too? Because that is the point of
> is_uncore_event() in collect(), to only collect events for _that_ pmu.

that looks ok.. I'll run the test 

jirka

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] perf/x86/uncore: Allow single pmu/box within events group Jiri Olsa <jolsa@redhat.com> - 2016-11-18 01:20 +0100
  Re: [PATCH] perf/x86/uncore: Allow single pmu/box within events group Peter Zijlstra <peterz@infradead.org> - 2016-11-18 12:30 +0100
    Re: [PATCH] perf/x86/uncore: Allow single pmu/box within events group Jiri Olsa <jolsa@redhat.com> - 2016-11-18 13:40 +0100
      Re: [PATCH] perf/x86/uncore: Allow single pmu/box within events group Peter Zijlstra <peterz@infradead.org> - 2016-11-18 14:00 +0100
        Re: [PATCH] perf/x86/uncore: Allow single pmu/box within events group Jiri Olsa <jolsa@redhat.com> - 2016-11-18 14:30 +0100
        Re: [PATCH] perf/x86/uncore: Allow single pmu/box within events group Jiri Olsa <jolsa@redhat.com> - 2016-11-18 14:50 +0100
          Re: [PATCH] perf/x86/uncore: Allow single pmu/box within events group Peter Zijlstra <peterz@infradead.org> - 2016-11-18 15:10 +0100
            Re: [PATCH] perf/x86/uncore: Allow single pmu/box within events group Jiri Olsa <jolsa@redhat.com> - 2016-11-18 15:40 +0100
              Re: [PATCH] perf/x86/uncore: Allow single pmu/box within events group Peter Zijlstra <peterz@infradead.org> - 2016-11-18 15:50 +0100
        [tip:perf/urgent] perf/x86/intel/uncore: Allow only a single  PMU/box within an events group tip-bot for Peter Zijlstra <tipbot@zytor.com> - 2016-11-22 13:40 +0100

csiph-web