Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5614898ybe; Tue, 17 Sep 2019 10:41:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLtidVdbIZc1czE65aKDNtOt65fmhaoXKYn0VDkXyaE5mfGkHvqg+13FhHxlJ0Tpkf5+N5 X-Received: by 2002:a17:906:5246:: with SMTP id y6mr5748851ejm.158.1568742109082; Tue, 17 Sep 2019 10:41:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568742109; cv=none; d=google.com; s=arc-20160816; b=f95e8Uzh04McXtHkvYWpaZDEptQLyItKxIkQfp8QRnaFJ8gbn08k1VMDJlAQPKa7lG rkiy2zCXHsGqR7hVROdHu9yQHzf2GKV6YG1VOWWECS7Fbz+4+0dqcEhELw15c6TySLwr MB2QDFcUGFcnvp0OMwYSgKnwcWVeA06AyY9cpjI/rh8wT5Rp5wiuLA6IK6/xXl9nGvPT vAdFaJO634tjmyzawVBxoOw7Tk6MF8eHxCiFd0AzBJjUtlqubmN4bu8oYZf5N2HWHSyM x522Tp3gNZiwngMnBRC+LAuwqV7JE0Xnlrk4zMNBszE9RqYdAAWze77egTFhG2tvNLj3 6uBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=HyHoiyMPzMegimSkPX6nT1kwNgkdPNQbkw15IN+iAiQ=; b=LYUpNT9iYDr6dq86Y15zOtHvJUkJy3BhRZyXyJocUAf9koODx3sEMBf69uFtEX/y2q Zj32GtYYtCXUsjDYkAW849f2CO5QR4kGKOJpt6h9ISIQpPjOPGzUBzJSNLo9RP82N1N4 JFzts2IpSpxJ5VklN+n06TtDjvNz/OMpta1lJqF9mT/ysJCR8LB7G1fb6tnpauGYFtl8 o1KqwHFe7y7omR7GN7sc0y6kfzK2hNW7k8IKqbMaYYmL0qsFm7jKJykQmQv8Jgi+Imhn mI8gXvhXbNrV4i0B/U5tI7yCx2isv2C0YBPUs1hStNdt1P4YNhsVilBrq5UM0pFyxLXu m48Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2si1759151edq.264.2019.09.17.10.41.15; Tue, 17 Sep 2019 10:41:49 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726721AbfIQOGj (ORCPT + 99 others); Tue, 17 Sep 2019 10:06:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60634 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726234AbfIQOGj (ORCPT ); Tue, 17 Sep 2019 10:06:39 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E2631300CB2C; Tue, 17 Sep 2019 14:06:38 +0000 (UTC) Received: from ovpn-117-172.phx2.redhat.com (ovpn-117-172.phx2.redhat.com [10.3.117.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 46B175D9D5; Tue, 17 Sep 2019 14:06:29 +0000 (UTC) Message-ID: <63b430ca2f067e61bef1c387fad782ab4a2c1ed3.camel@redhat.com> Subject: Re: [PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs From: Scott Wood To: Sebastian Andrzej Siewior 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 Date: Tue, 17 Sep 2019 09:06:28 -0500 In-Reply-To: <20190917074456.yj7t3wdwuhn3zcng@linutronix.de> References: <20190911165729.11178-1-swood@redhat.com> <20190911165729.11178-2-swood@redhat.com> <20190917074456.yj7t3wdwuhn3zcng@linutronix.de> Organization: Red Hat Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 17 Sep 2019 14:06:39 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-09-17 at 09:44 +0200, Sebastian Andrzej Siewior wrote: > On 2019-09-11 17:57:25 [+0100], Scott Wood wrote: > > > > @@ -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? Sorry, I missed that you were asking about rcu_read_lock_bh() as well. I did remove the change to rcu_read_lock_bh_held(). With this patch, local_bh_disable() calls rcu_read_lock() on RT which handles this debug stuff. Doing it twice shouldn't be explicitly harmful, but it's redundant, and debug kernels are slow enough as is. -Scott