[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151104155334.GM17308@twins.programming.kicks-ass.net>
Date: Wed, 4 Nov 2015 16:53:34 +0100
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 v3] perf: fix RCU issues with cgroup monitoring mode
On Wed, Nov 04, 2015 at 05:12:19AM +0100, Stephane Eranian wrote:
>
> This patch eliminates 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.
>
> V2 is updated to include comments from PeterZ to eliminate
> some of the warnings without grabbing the rcu_read lock because
> we know we are already holding th ctx->lock which prevents
> the cgroup from disappearing while we are accessing it.
> The trick, as suggested by Peter, is to modify the
> perf_cgroup_from_task() to take an extra boolean parameter
> to allow bypassing the lockdep test in the task_subsys_cstate()
> macros. This patch uses this approach to update all calls the
> perf_cgroup_from_task().
>
> In V3, we change the boolean parameter for a pointer to a
> perf_event_context so we can check the ctx->lock explicitely.
> This is more robust, than passing the boolean to express that
> we know the lock is held. The code can change, and thus the
> locking assumption, checking lockdep_is_held() ensures,
> the proper locking is in place. Patch relative to tip.git
> at commit 57ef9fc.
So aside from the reported build fails; this is not suitable Changelog.
Also, please split it at least two patches; as there are at least the
two distinct issues here.
One is the perf_cgroup_sched_{in,out} thing, which requires moving the
rcu_read_lock bits around, the other is the timestamp bits which require
the ctx argument.
--
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