Re: [PATCH tip v4 4/5] rcu: Do not call rcu_nocb_gp_cleanup() while holding rnp->lock

From: Daniel Wagner
Date: Wed Nov 25 2015 - 05:29:18 EST


Hi Boqun,

On 11/25/2015 02:01 AM, Boqun Feng wrote:
> On Tue, Nov 24, 2015 at 11:52:12PM +0800, Boqun Feng wrote:
>> Hi Daniel,
>>
>> On Tue, Nov 24, 2015 at 02:03:06PM +0100, Daniel Wagner wrote:
>>> rcu_nocb_gp_cleanup() is called while holding rnp->lock. Currently,
>>> this is okay because the wake_up_all() in rcu_nocb_gp_cleanup() will
>>> not enable the IRQs. lockdep is happy.
>>>
>>> By switching over using swait this is not true anymore. swake_up_all()
>>> enables the IRQs while processing the waiters. __do_softirq() can now
>>> run and will eventually call rcu_process_callbacks() which wants to
>>> grap nrp->lock.
>>>
>>> Let's move the rcu_nocb_gp_cleanup() call outside the lock before we
>>> switch over to swait.
>>>
>>
>> But you did introduce swait in this patch ;-)

Argh, that is a fail. I did build all patches individual but seems like
I haven't got the right configuration.

>> [snip]
>>
>>>
>>> Signed-off-by: Daniel Wagner <daniel.wagner@xxxxxxxxxxxx>
>>> Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>
>>> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
>>> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>>> Cc: linux-kernel@xxxxxxxxxxxxxxx
>>> ---
>>> kernel/rcu/tree.c | 4 +++-
>>> kernel/rcu/tree.h | 3 ++-
>>> kernel/rcu/tree_plugin.h | 16 +++++++++++++---
>>> 3 files changed, 18 insertions(+), 5 deletions(-)
>>>
>>
>> So I tried to build this patch with a config having RCU_EXPERT=y and
>> RCU_NOCB_CPU=y, but I got:

Will update my config accordingly.

Thanks,
Daniel
--
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/