From: Peter Zijlstra <peterz@infradead.org>
To: Stephane Eranian <eranian@google.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, ak@linux.intel.com,
edumazet@google.com, acme@redhat.com
Subject: Re: [PATCH v3] perf: fix RCU issues with cgroup monitoring mode
Date: Wed, 4 Nov 2015 16:53:34 +0100 [thread overview]
Message-ID: <20151104155334.GM17308@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20151104041219.GA12969@thinkpad>
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.
prev parent reply other threads:[~2015-11-04 15:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 4:12 Stephane Eranian
2015-11-04 4:29 ` kbuild test robot
2015-11-04 4:41 ` kbuild test robot
2015-11-04 15:53 ` Peter Zijlstra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151104155334.GM17308@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=edumazet@google.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®