Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5501223ybe; Tue, 17 Sep 2019 08:55:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6B4RE+Mxua4QiNP8m/R4bBnUHtwtbUW9qOmuyMCFHeqJLE1658rWS1me+3iz+Pu+kfz1p X-Received: by 2002:a17:906:583:: with SMTP id 3mr5264180ejn.74.1568735750307; Tue, 17 Sep 2019 08:55:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568735750; cv=none; d=google.com; s=arc-20160816; b=ubpfMovGuxCAvU+/I1GVOUMwmC/RGkzxKDCWeC/+iiYJdyJlOdC/pNscV0nE3JH8aS /YX0dY+N6UY82pfSUxysvCN6jZdeiKAzUTG7RXiP1S2q/Eq5gA3N2JVxRTQCV6Q0kZmA 0Q3TDwm/Ax+mjxk93BLYaRoGDXihhKyCEh4J0arLYLj0rKfc2D0xl4gIF2GKd6uun+YM YfZw9ce3f3VnrW0Y1guLnY5yt2Y9rlyZpFAJiFFbJzMkdbbHL5TmCO7fo+yVfmHyxMIB Fg44z3M26poC0/pJzDKxBl1yzD1ZIc0IJbi9Npw+mwC2OuKoEBCFQ3X9zHwLASZ6Bdvw dLZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=/WSx5UgaAnQqITNhmylz9NmmKcrvNJLC5TBFXDtYf10=; b=tLZ8Eu2o5HO/EScmZMKwiNYqWBiAH97EdEHG7AY8p6JI2I7Uh8I/LS+N45RhjcrFz1 +AdFxb1P7acr1ZkAJUBSGAkOhSEZC1gCha1z5ipvzHK3lfddCQNwWfaFkNAXKUQkoaO7 tRQdvisMszK5mCpXQ6HALs4Ap8rj92TwPLdbNq3c2CidpslkzyRDrmidpjOCdKHWcoS3 WXbAyMiajUBBGEHB0KACDpD8LOb7zATBv9Cki4Fc1I9W+nyIDbhsCASK1Nq/qIYO/vOp FLOmphqa8r7qNq1RhjW+kh+ZIA6hE4Pod903HkILXjx3es/3AR8fAOtsK2+F3dajsxkE 7FSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g25si511695edr.71.2019.09.17.08.55.26; Tue, 17 Sep 2019 08:55:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404064AbfIQHpB (ORCPT + 99 others); Tue, 17 Sep 2019 03:45:01 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:40832 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728561AbfIQHpB (ORCPT ); Tue, 17 Sep 2019 03:45:01 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1iA8AT-0005bn-3S; Tue, 17 Sep 2019 09:44:57 +0200 Date: Tue, 17 Sep 2019 09:44:57 +0200 From: Sebastian Andrzej Siewior To: Scott Wood Cc: linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org, "Paul E . McKenney" , Joel Fernandes , Thomas Gleixner , Steven Rostedt , Peter Zijlstra , Juri Lelli , Clark Williams Subject: Re: [PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs Message-ID: <20190917074456.yj7t3wdwuhn3zcng@linutronix.de> References: <20190911165729.11178-1-swood@redhat.com> <20190911165729.11178-2-swood@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190911165729.11178-2-swood@redhat.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-09-11 17:57:25 [+0100], Scott Wood wrote: > index 388ace315f32..9ce7c5006a5e 100644 > --- a/include/linux/rcupdate.h > +++ b/include/linux/rcupdate.h > @@ -600,6 +600,36 @@ static inline void rcu_read_unlock(void) > rcu_lock_release(&rcu_lock_map); /* Keep acq info for rls diags. */ > } > > +#ifdef CONFIG_PREEMPT_RT_FULL > +/* > + * On RT, local_bh_disable() calls rcu_read_lock() -- no need to > + * track it twice. > + */ > +static inline void rcu_bh_lock_acquire(void) > +{ > +} > + > +static inline void rcu_bh_lock_release(void) > +{ > +} > +#else > +static inline void rcu_bh_lock_acquire(void) > +{ > + __acquire(RCU_BH); > + rcu_lock_acquire(&rcu_bh_lock_map); > + RCU_LOCKDEP_WARN(!rcu_is_watching(), > + "rcu_read_lock_bh() used illegally while idle"); > +} > + > +static inline void rcu_bh_lock_release(void) > +{ > + RCU_LOCKDEP_WARN(!rcu_is_watching(), > + "rcu_read_unlock_bh() used illegally while idle"); > + rcu_lock_release(&rcu_bh_lock_map); > + __release(RCU_BH); > +} > +#endif > + > /** > * rcu_read_lock_bh() - mark the beginning of an RCU-bh critical section > * > @@ -615,10 +645,7 @@ static inline void rcu_read_unlock(void) > static inline void rcu_read_lock_bh(void) > { > local_bh_disable(); > - __acquire(RCU_BH); > - rcu_lock_acquire(&rcu_bh_lock_map); > - RCU_LOCKDEP_WARN(!rcu_is_watching(), > - "rcu_read_lock_bh() used illegally while idle"); > + rcu_bh_lock_acquire(); > } > > /* I asked previously why do you need to change rcu_read_lock_bh() and you replied that you don't remember: https://lore.kernel.org/linux-rt-users/b948ec6cccda31925ed8dc123bd0f55423fff3d4.camel@redhat.com/ Did this change? Sebastian