Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1262399

Re: [PATCH v3] perf: fix RCU issues with cgroup monitoring mode

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3] perf: fix RCU issues with cgroup monitoring mode
Date 2015-11-04 17:00 +0100
Message-ID <qr8DF-2nj-39@gated-at.bofh.it> (permalink)
References <qqXId-3WC-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v3] perf: fix RCU issues with cgroup monitoring mode Stephane Eranian <eranian@google.com> - 2015-11-04 05:20 +0100
  Re: [PATCH v3] perf: fix RCU issues with cgroup monitoring mode kbuild test robot <lkp@intel.com> - 2015-11-04 05:50 +0100
  Re: [PATCH v3] perf: fix RCU issues with cgroup monitoring mode Peter Zijlstra <peterz@infradead.org> - 2015-11-04 17:00 +0100

csiph-web