[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150330135410.GX23123@twins.programming.kicks-ass.net>
Date: Mon, 30 Mar 2015 15:54:10 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Kan Liang <kan.liang@...el.com>
Cc: linux-kernel@...r.kernel.org, mingo@...nel.org, acme@...radead.org,
eranian@...gle.com, andi@...stfloor.org
Subject: Re: [PATCH V5 3/6] perf, x86: large PEBS interrupt threshold
On Mon, Feb 23, 2015 at 09:25:53AM -0500, Kan Liang wrote:
> +/*
> + * Flags PEBS can handle without an PMI.
> + *
> + * TID can only be handled by flushing at context switch.
> + */
> +#define PEBS_FREERUNNING_FLAGS \
> + (PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_ADDR | \
> + PERF_SAMPLE_ID | PERF_SAMPLE_CPU | PERF_SAMPLE_STREAM_ID | \
> + PERF_SAMPLE_DATA_SRC | PERF_SAMPLE_IDENTIFIER | \
> + PERF_SAMPLE_TRANSACTION)
> +
> @@ -683,6 +700,21 @@ void intel_pmu_pebs_enable(struct perf_event *event)
> else if (event->hw.flags & PERF_X86_EVENT_PEBS_ST)
> cpuc->pebs_enabled |= 1ULL << 63;
>
> + /*
> + * When the event is constrained enough we can use a larger
> + * threshold and run the event with less frequent PMI.
> + */
> + if (0 && /* disable this temporarily */
> + (hwc->flags & PERF_X86_EVENT_AUTO_RELOAD) &&
> + !(event->attr.sample_type & ~PEBS_FREERUNNING_FLAGS)) {
Why not do the FREERUNNING flags thing in intel_pmu_hw_config() when you
set AUTO_RELOAD and make AUTO_RELOAD conditional on it.
That way you only have a single test here. AUTO_RELOAD implies the
sample_type conforms.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists