[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABPqkBQEVT0fLTQ20UdUMxEFNKW9vrtvOVgSkWZXbyFBPzmXaQ@mail.gmail.com>
Date: Mon, 7 Nov 2011 14:44:21 +0000
From: Stephane Eranian <eranian@...gle.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Li Zefan <lizf@...fujitsu.com>, paulmck@...ux.vnet.ibm.com,
Ingo Molnar <mingo@...e.hu>, shaohua.li@...el.com,
ak@...ux.intel.com, mhocko@...e.cz, alex.shi@...el.com,
efault@....de, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Paul Turner <pjt@...gle.com>
Subject: Re: [GIT PULL rcu/next] RCU commits for 3.1
On Mon, Nov 7, 2011 at 2:41 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> Le lundi 07 novembre 2011 à 14:24 +0000, Stephane Eranian a écrit :
>> Hi,
>>
>> Some second thoughts on this.
>>
>> We get the warning because:
>>
>> #define task_subsys_state_check(task, subsys_id, __c) \
>> rcu_dereference_check(task->cgroups->subsys[subsys_id], \
>> lockdep_is_held(&task->alloc_lock) || \
>> cgroup_lock_is_held() || (__c))
>>
>>
>> In other words, we need the alloc_lock held.
>>
>> What I don't quite understand in your patch in the connection
>> between rcu and this particular task lock. Unless holding
>> the rcu read lock implies you necessarily hold the alloc_lock.
>>
>> Can you explain?
>
> #define rcu_dereference_check(p, c) \
> __rcu_dereference_check((p), rcu_read_lock_held() || (c), __rcu)
>
> So if you hold rcu_read_lock(), (c) is not checked/asserted.
>
Ok, got it now. I only looked at the lockdep_is_held() part, thus my confusion.
Thanks.
>
>
>
--
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