Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3562369ybd; Fri, 28 Jun 2019 10:46:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7Jwbf/t5DiYyikuMrNmzGLF0nSmBIfxf1VPlTXP5QV80UjOvaJ9RQobm8VM4pLwww74dj X-Received: by 2002:a17:902:f089:: with SMTP id go9mr12983439plb.81.1561743980573; Fri, 28 Jun 2019 10:46:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561743980; cv=none; d=google.com; s=arc-20160816; b=b7/I1F5VF0Z5iPCSP/oIdOSk0462XUdhWBrraW/R8Qnvvm8Whc252CRVmqmzPQoEqU GAI4uI5xFUxY+a+CKHNBbHMIMGZ1lnu6dAfAe6OiSzBnoGBIOs+P9NZCBUNLPrHSdtK9 fHO+bKWK6PXwgRtLqTPikGtWv03xfFUIl7IweaoZmtB+7Go+L7NoFkSG/CQhwzaxU3Vd jOqOBrLo2O3NCUvtaK0VH7by3d1H7FGRZy1iIBphPe+hbMk0XpROb+ggMpxGlh8mfFLV Q4rvxN0sY0TithOM8AlRHE6kDobXHv7EeV5YWitmv2gvZQfAPxSJJuL4LmvKma0f3IK/ VN8w== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=i1bnsfFAvony2OBSnNKHRlneOoUPqvAHPGRxnk3DJvw=; b=KrFgY4lSwCBdL6JhqPgcrFscQxZD2cGpGPxK+Kx2hM22FaFNj+/nDhLpmxa53eem3z /c1gNTy0ycPvIxDKnjKqG3Xm428JsxDHJZRGG1WAdHRItVNWZo2+FmfHTu7htwtgXDQe cTnpRWyEGdDe508mA8J0mQQHmjtQ548fdBV5GDFME8HjbSZzAkAetwbqIVahNjmc/WXJ zLmjORe9WUDYVmTXXBoqqHDB7LY5aniWocftGF1TAO4fvvfRI9mnUvP9GefdZWDfNs3D rR290mfmd5SPr3ekRivI1uCR92VXD1L6q7aNbygPC5NlS8vm+yLKDS1RZXanWm8dIhmQ DQbw== 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 n10si2486155pgq.416.2019.06.28.10.46.03; Fri, 28 Jun 2019 10:46:20 -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 S1726667AbfF1Rpx convert rfc822-to-8bit (ORCPT + 99 others); Fri, 28 Jun 2019 13:45:53 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:37290 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726443AbfF1Rpw (ORCPT ); Fri, 28 Jun 2019 13:45:52 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1hguwT-0003SD-J0; Fri, 28 Jun 2019 19:45:45 +0200 Date: Fri, 28 Jun 2019 19:45:45 +0200 From: Sebastian Andrzej Siewior To: "Paul E. McKenney" Cc: Joel Fernandes , Steven Rostedt , rcu , LKML , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan Subject: Re: [RFC] Deadlock via recursive wakeup via RCU with threadirqs Message-ID: <20190628174545.pwgwi3wxl2eapkvm@linutronix.de> References: <20190627103455.01014276@gandalf.local.home> <20190627153031.GA249127@google.com> <20190627155506.GU26519@linux.ibm.com> <20190627173831.GW26519@linux.ibm.com> <20190627181638.GA209455@google.com> <20190627184107.GA26519@linux.ibm.com> <20190628164008.GB240964@google.com> <20190628164559.GC240964@google.com> <20190628173011.GX26519@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20190628173011.GX26519@linux.ibm.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-06-28 10:30:11 [-0700], Paul E. McKenney wrote: > > I believe the .blocked field remains set even though we are not any more in a > > reader section because of deferred processing of the blocked lists that you > > mentioned yesterday. > > That can indeed happen. However, in current -rcu, that would mean > that .deferred_qs is also set, which (if in_irq()) would prevent > the raise_softirq_irqsoff() from being invoked. Which was why I was > asking the questions about whether in_irq() returns true within threaded > interrupts yesterday. If it does, I need to find if there is some way > of determining whether rcu_read_unlock_special() is being called from > a threaded interrupt in order to suppress the call to raise_softirq() > in that case. Please not that: | void irq_exit(void) | { |… in_irq() returns true | preempt_count_sub(HARDIRQ_OFFSET); in_irq() returns false | if (!in_interrupt() && local_softirq_pending()) | invoke_softirq(); -> invoke_softirq() does | if (!force_irqthreads) { | __do_softirq(); | } else { | wakeup_softirqd(); | } so for `force_irqthreads' rcu_read_unlock_special() within wakeup_softirqd() will see false. > Thanx, Paul Sebastian