From: Peter Zijlstra <peterz@infradead.org>
To: kan.liang@intel.com
Cc: tglx@linutronix.de, mingo@redhat.com,
linux-kernel@vger.kernel.org, acme@kernel.org,
eranian@google.com, ak@linux.intel.com
Subject: Re: [PATCH V6 5/8] perf/x86/intel/uncore: add infrastructure for free running counter
Date: Sat, 17 Mar 2018 10:34:38 +0100 [thread overview]
Message-ID: <20180317093438.GI4064@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1516911228-5293-5-git-send-email-kan.liang@intel.com>
On Thu, Jan 25, 2018 at 12:13:45PM -0800, kan.liang@intel.com wrote:
> @@ -512,6 +538,17 @@ static int uncore_pmu_event_add(struct perf_event *event, int flags)
> if (!box)
> return -ENODEV;
>
> + /*
> + * The free funning counter is assigned in event_init().
> + * The free running counter event and free running counter
> + * are 1:1 mapped. It doesn't need to be tracked in event_list.
> + */
> + if (uncore_pmc_freerunning(hwc->idx)) {
> + if (flags & PERF_EF_START)
> + uncore_pmu_event_start(event, 0);
> + return 0;
> + }
> +
> ret = n = uncore_collect_events(box, event, false);
> if (ret < 0)
> return ret;
This will result in some (probably) unexpected scheduling artifacts.
Probably the only way to really cure that is to have the free running
counters in their own PMU and not share with the GP counters of this
box.
next prev parent reply other threads:[~2018-03-17 9:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 20:13 [PATCH V6 1/8] perf/x86/intel/uncore: customized event_read for client IMC uncore kan.liang
2018-01-25 20:13 ` [PATCH V6 2/8] perf/x86/intel/uncore: correct fixed counter index check for NHM kan.liang
2018-01-25 20:13 ` [PATCH V6 3/8] perf/x86/intel/uncore: correct fixed counter index check in generic code kan.liang
2018-01-25 20:13 ` [PATCH V6 4/8] perf/x86/intel/uncore: add new data structures for free running counters kan.liang
2018-01-25 20:13 ` [PATCH V6 5/8] perf/x86/intel/uncore: add infrastructure for free running counter kan.liang
2018-03-17 9:34 ` Peter Zijlstra [this message]
2018-03-19 13:00 ` Liang, Kan
2018-01-25 20:13 ` [PATCH V6 6/8] perf/x86/intel/uncore: SKX support for IIO free running counters kan.liang
2018-01-25 20:13 ` [PATCH V6 7/8] perf/x86/intel/uncore: expose uncore_pmu_event functions kan.liang
2018-01-25 20:13 ` [PATCH V6 8/8] perf/x86/intel/uncore: clean up client IMC uncore kan.liang
2018-03-16 16:48 ` [PATCH V6 1/8] perf/x86/intel/uncore: customized event_read for " 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=20180317093438.GI4064@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--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=tglx@linutronix.de \
/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
Powered by JetHome