[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151017095651.GE3816@twins.programming.kicks-ass.net>
Date: Sat, 17 Oct 2015 11:56:51 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Stephane Eranian <eranian@...gle.com>
Cc: linux-kernel@...r.kernel.org, mingo@...e.hu, ak@...ux.intel.com,
edumazet@...gle.com, acme@...hat.com
Subject: Re: [PATCH] perf/core: fix RCU issues with cgroup monitoring mode
On Sat, Oct 17, 2015 at 03:28:11AM +0200, Stephane Eranian wrote:
>
> This patch eliminates all known RCU violations detected
> by the RCU checker (PROVE_RCU). The impact code paths
> were all related to cgroup mode monitoring and involved
> access a task's cgrp.
But were they right? This patch provides no clues.
> Signed-off-by: Stephane Eranian <eranian@...gle.com>
> ---
> @@ -2094,6 +2104,7 @@ static int __perf_install_in_context(void *info)
> cpuctx->task_ctx = task_ctx;
> task = task_ctx->task;
> }
> + rcu_read_lock();
>
> cpu_ctx_sched_out(cpuctx, EVENT_ALL);
>
> @@ -2112,6 +2123,8 @@ static int __perf_install_in_context(void *info)
> */
> perf_event_sched_in(cpuctx, task_ctx, task);
>
> + rcu_read_unlock();
> +
> perf_pmu_enable(cpuctx->ctx.pmu);
> perf_ctx_unlock(cpuctx, task_ctx);
>
> @@ -2398,7 +2411,9 @@ static void ctx_sched_out(struct perf_event_context *ctx,
> return;
>
> update_context_time(ctx);
> + rcu_read_lock();
> update_cgrp_time_from_cpuctx(cpuctx);
> + rcu_read_unlock();
> if (!ctx->nr_active)
> return;
>
And these impact !cgroup code, and the last looks like it should be
inside update_cgrp_time_from_cpuctx() if at all.
--
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