Re: [GIT PULL rcu/next] RCU commits for 3.1

From: Stephane Eranian
Date: Tue Nov 08 2011 - 08:10:20 EST


hardcoding 1 (true) assumes we will always call perf_cgroup_set_timestamp()
on current task. That's true today but we should make sure we don't
miss an error
if we ever change that in the future.


On Mon, Nov 7, 2011 at 6:55 PM, Paul E. McKenney
<paulmck@xxxxxxxxxxxxxxxxxx> wrote:
> On Mon, Nov 07, 2011 at 06:09:49PM +0100, Peter Zijlstra wrote:
>> On Mon, 2011-11-07 at 08:56 -0800, Paul E. McKenney wrote:
>> >
>> > If this really is a false positive, what should be used to get rid of
>> > the splats?
>>
>>
>> Probably something slightly less horrid than the below.. ;-)
>
> Hmmm... ÂCould the "1" below be replaced by the task's reference count?
> Probabilistic, but should eventually catch it.
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ÂThanx, Paul
>
>> ---
>>
>> diff --git a/kernel/events/core.c b/kernel/events/core.c
>> index d1a1bee..8f05201 100644
>> --- a/kernel/events/core.c
>> +++ b/kernel/events/core.c
>> @@ -229,7 +229,7 @@ static void perf_ctx_unlock(struct perf_cpu_context *cpuctx,
>> Âstatic inline struct perf_cgroup *
>> Âperf_cgroup_from_task(struct task_struct *task)
>> Â{
>> - Â Â return container_of(task_subsys_state(task, perf_subsys_id),
>> + Â Â return container_of(task_subsys_state_check(task, perf_subsys_id, 1),
>> Â Â Â Â Â Â Â Â Â Â Â struct perf_cgroup, css);
>> Â}
>>
>>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/