lkml.org 
[lkml]   [2015]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] perf/core: fix RCU issues with cgroup monitoring mode
From
Date
On Tue, 2015-10-27 at 16:37 -0700, Stephane Eranian wrote:

> But that macro is already embedded into the task_css_set() macro.
> What we are saying here is that we have another way of ensuring the
> cgroup cannot disappear here, and thus the rcu lockdep detects we
> are not holding the rcu read lock but we know this is okay. We are
> trying to avoid grabbing the rcu read lock when it is not really needed
> to guarantee correct execution. So we are just shutting up the lockdep
> in these particular cases by passing true as the safe argument value.

Sure, but in lockdep verbs, the following :

+ /* holding ctx->lock, so cgroup access is safe */
+ cgrp = perf_cgroup_from_task(task, true);

would map to :

cgrp = perf_cgroup_from_task(task, lockdep_is_held(&ctx->lock));

Notice the comment becomes useless.





\
 
 \ /
  Last update: 2015-10-28 01:41    [W:0.038 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site