Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752381AbbKYK3O (ORCPT ); Wed, 25 Nov 2015 05:29:14 -0500 Received: from mail.bmw-carit.de ([62.245.222.98]:45001 "EHLO mail.bmw-carit.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752041AbbKYK3M (ORCPT ); Wed, 25 Nov 2015 05:29:12 -0500 X-CTCH-RefID: str=0001.0A0C0204.56558D72.014B,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Subject: Re: [PATCH tip v4 4/5] rcu: Do not call rcu_nocb_gp_cleanup() while holding rnp->lock To: Boqun Feng References: <1448370187-10075-1-git-send-email-daniel.wagner@bmw-carit.de> <1448370187-10075-5-git-send-email-daniel.wagner@bmw-carit.de> <20151124155212.GA1165@fixme-laptop.cn.ibm.com> <20151125010118.GB1165@fixme-laptop.cn.ibm.com> CC: , , "Paul E. McKenney" , Peter Zijlstra , Thomas Gleixner , Marcelo Tosatti , Paolo Bonzini , Paul Gortmaker From: Daniel Wagner Message-ID: <56558D71.5050605@bmw-carit.de> Date: Wed, 25 Nov 2015 11:29:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151125010118.GB1165@fixme-laptop.cn.ibm.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1766 Lines: 52 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 >>> Cc: "Paul E. McKenney" >>> Cc: Peter Zijlstra >>> Cc: Thomas Gleixner >>> Cc: linux-kernel@vger.kernel.org >>> --- >>> 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/