Re: [PATCH 3/3] perf: Fix mux_interval hrtimer wreckage

From: Thomas Gleixner
Date: Wed Apr 22 2015 - 11:11:55 EST


On Wed, 15 Apr 2015, Peter Zijlstra wrote:
> -static void perf_cpu_hrtimer_restart(struct perf_cpu_context *cpuctx)
> +static int perf_mux_hrtimer_restart(struct perf_cpu_context *cpuctx)
> {
> - struct hrtimer *hr = &cpuctx->hrtimer;
> + struct hrtimer *timer = &cpuctx->hrtimer;
> struct pmu *pmu = cpuctx->ctx.pmu;
>
> /* not for SW PMU */
> if (pmu->task_ctx_nr == perf_sw_context)
> - return;
> + return 0;
>
> - if (hrtimer_active(hr))
> - return;
> + if (hrtimer_is_queued(timer))
> + return 0;
>
> - hrtimer_start(hr, cpuctx->hrtimer_interval, HRTIMER_MODE_REL_PINNED);
> + hrtimer_start(timer, cpuctx->hrtimer_interval, HRTIMER_MODE_REL_PINNED);

return 0;

> }

I fixed it up when applying it.

Thanks,

tglx

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/