From: Thomas Gleixner <tglx@linutronix.de>
To: Kan Liang <kan.liang@intel.com>
Cc: peterz@infradead.org, mingo@redhat.com,
linux-kernel@vger.kernel.org, acme@kernel.org,
eranian@google.com, ak@linux.intel.com
Subject: Re: [PATCH V4 4/8] perf/x86/intel/uncore: add new data structures for free running counters
Date: Sun, 14 Jan 2018 21:52:44 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1801142152270.2371@nanos> (raw)
In-Reply-To: <alpine.DEB.2.20.1801142148180.2371@nanos>
On Sun, 14 Jan 2018, Thomas Gleixner wrote:
> On Thu, 2 Nov 2017, kan.liang@intel.com wrote:
> > +/*
> > + * Free running counter is similar as fixed counter, except it is read-only
> > + * and always active when the uncore box is powered up.
> > + *
> > + * Here are the rules which are used to encode the event for free running
> > + * counter.
> > + * - The event for free running counter has the same event code 0xff as
> > + * the event for fixed counter.
> > + * - The umask of the event starts from 0x10. The umask which is less
> > + * than 0x10 is reserved for the event of fixed counter.
> > + * - The free running counters can be divided into different types according
> > + * to the MSR location, bit width or definition. The start point of the
> > + * umask for different type has 0x10 offset.
> > + *
> > + * For example, there are three types of IIO free running counters on Skylake
> > + * server, IO CLOCKS counters, BANDWIDTH counters and UTILIZATION counters.
> > + * The event code for all the free running counters is 0xff.
> > + * 'ioclk' is the first counter of IO CLOCKS. IO CLOCKS is the first type,
> > + * which umask starts from 0x10.
> > + * So 'ioclk' is encoded as event=0xff,umask=0x10
> > + * 'bw_in_port2' is the third counter of BANDWIDTH counters. BANDWIDTH is
> > + * the second type, which umask starts from 0x20.
> > + * So 'bw_in_port2' is encoded as event=0xff,umask=0x22
> > + */
> > +static inline unsigned int uncore_freerunning_idx(u64 config)
> > +{
> > + return ((config >> 8) & 0xf);
> > +}
> > +
> > +#define UNCORE_FREERUNNING_UMASK_START 0x10
> > +static inline unsigned int uncore_freerunning_type(u64 config)
>
> Groan. I asked that before that you please stop glueing defines right in
> front of a function declaration w/o any visible space. Is it that hard to
> read and address _ALL_ review comments?
>
> > +{
> > + return ((((config >> 8) - UNCORE_FREERUNNING_UMASK_START) >> 4) & 0xf);
> > +}
>
> Other than that this looks reasonable.
Hit send to early:
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
next prev parent reply other threads:[~2018-01-14 20:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 20:29 [PATCH V4 1/8] perf/x86/intel/uncore: customized event_read for client IMC uncore kan.liang
2017-11-02 20:29 ` [PATCH V4 2/8] perf/x86/intel/uncore: correct fixed counter index check for NHM kan.liang
2018-01-14 20:47 ` Thomas Gleixner
2017-11-02 20:29 ` [PATCH V4 3/8] perf/x86/intel/uncore: correct fixed counter index check in generic code kan.liang
2018-01-14 20:47 ` Thomas Gleixner
2017-11-02 20:29 ` [PATCH V4 4/8] perf/x86/intel/uncore: add new data structures for free running counters kan.liang
2018-01-14 20:50 ` Thomas Gleixner
2018-01-14 20:52 ` Thomas Gleixner [this message]
2017-11-02 20:29 ` [PATCH V4 5/8] perf/x86/intel/uncore: add infrastructure for free running counter kan.liang
2018-01-14 20:52 ` Thomas Gleixner
2018-01-15 15:53 ` Liang, Kan
2017-11-02 20:29 ` [PATCH V4 6/8] perf/x86/intel/uncore: SKX support for IIO free running counters kan.liang
2018-01-14 20:54 ` Thomas Gleixner
2017-11-02 20:29 ` [PATCH V4 7/8] perf/x86/intel/uncore: expose uncore_pmu_event functions kan.liang
2018-01-14 20:53 ` Thomas Gleixner
2017-11-02 20:29 ` [PATCH V4 8/8] perf/x86/intel/uncore: clean up client IMC uncore kan.liang
2018-01-14 20:53 ` Thomas Gleixner
2017-11-17 2:18 ` [PATCH V4 1/8] perf/x86/intel/uncore: customized event_read for " Liang, Kan
2017-11-17 8:46 ` Thomas Gleixner
2017-12-11 13:53 ` Liang, Kan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1801142152270.2371@nanos \
--to=tglx@linutronix.de \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®