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


Groups > linux.kernel > #1384128

RE: [PATCH 1/1] perf/x86/intel/uncore: Add support for Intel SKL client uncore

From "Liang, Kan" <kan.liang@intel.com>
Newsgroups linux.kernel
Subject RE: [PATCH 1/1] perf/x86/intel/uncore: Add support for Intel SKL client uncore
Date 2016-04-21 14:00 +0200
Message-ID <rqlr4-8y-15@gated-at.bofh.it> (permalink)
References (1 earlier) <rq0wi-aJ-13@gated-at.bofh.it> <rq0PD-jH-1@gated-at.bofh.it> <rq1LJ-13P-23@gated-at.bofh.it> <rq2eK-1vN-7@gated-at.bofh.it> <rqhQt-61u-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



> 
> On Wed, 20 Apr 2016, Liang, Kan wrote:
> > > On Wed, 20 Apr 2016, Liang, Kan wrote:
> > > > > The stop of the box1 events disables the whole machinery on that
> > > > > node and therefor the box0 event is wreckaged as well. Hmm?
> > > > >
> > > > Right. How about check the SKL_UNC_PERF_GLOBAL_CTL in
> enable_event?
> > > > If it's cleared, we can reset it there. The drawback is that there
> > > > will be an extra rdmsrl and a possible wrmsrl.
> > >
> > > Well, that does not buy anything as you cannot disable the thing at
> > > all, unless you have refcounting. And that refcounting needs to be in the
> 'type'
> > > struct and that would probably be some real pain to implement.
> > >
> > > The question is whether we need enable/disable at all. If the type
> > > is initialized we enable it and on exit we disable it. Ditto on cpu
> > > hotplug - which is also used for init to enable all nodes.
> > >
> > > So if there is no drawback in letting the thing enabled if no events
> > > are armed, then we really can do w/o the enable/disable_box callbacks.
> > >
> > There is no drawback in letting the thing enabled, but PERF_GLOBAL_CTL
> > could be disabled after Package C7. I add the enable/disable thing to
> > try to workaround it.
> 
> I don't see how that solves it. If a counter is active, then C7 will stop it and
> you wont get anything useful from it after returning from C7. Or does an
> active counter prevent C7?

Right, the workaround doesn't cover all cases. It helps for the new events
and the cases that monitoring a busy system. A busy system means it never
enter C7 during the counting.
I will mention it in the changelog of V2. 

> 
> > I once did the test on a SKL laptop. If the machine goes idle for a
> > while, then the uncore counter will always return 0. For fixing it, we
> > have to re-enable PERF_GLOBAL_CTL.
> 
> Hmm, but that does only help for new events after returning from C7, right?

Yes.

> 
> > I think I made a typo in previous reply. I mean we can check it or
> > just force rewrite the PERF_GLOBAL_CTL in enable_box. We don't need
> > disable_box since there is no drawback in letting the thing enabled.
> 
> Sure, but then you can just unconditionally enable it. IOW, leave the enable
> callback as is.

Will do that in V2.

Thanks,
Kan

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


Thread

Re: [PATCH 1/1] perf/x86/intel/uncore: Add support for Intel SKL  client uncore Thomas Gleixner <tglx@linutronix.de> - 2016-04-20 15:40 +0200
  RE: [PATCH 1/1] perf/x86/intel/uncore: Add support for Intel SKL  client uncore "Liang, Kan" <kan.liang@intel.com> - 2016-04-20 16:00 +0200
    RE: [PATCH 1/1] perf/x86/intel/uncore: Add support for Intel SKL  client uncore Thomas Gleixner <tglx@linutronix.de> - 2016-04-20 17:00 +0200
      RE: [PATCH 1/1] perf/x86/intel/uncore: Add support for Intel SKL  client uncore "Liang, Kan" <kan.liang@intel.com> - 2016-04-20 17:30 +0200
        RE: [PATCH 1/1] perf/x86/intel/uncore: Add support for Intel SKL  client uncore Thomas Gleixner <tglx@linutronix.de> - 2016-04-21 10:10 +0200
          RE: [PATCH 1/1] perf/x86/intel/uncore: Add support for Intel SKL  client uncore "Liang, Kan" <kan.liang@intel.com> - 2016-04-21 14:00 +0200
    Re: [PATCH 1/1] perf/x86/intel/uncore: Add support for Intel SKL  client uncore Andi Kleen <ak@linux.intel.com> - 2016-04-20 18:40 +0200

csiph-web