Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2230451ybi; Mon, 1 Jul 2019 08:24:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/caSdtLcnUrPeJXoDchSWU1tVodY3iCZ/A5eprW17NEbud6vuTnJOh0VMw7RYicS6usak X-Received: by 2002:a17:90a:3590:: with SMTP id r16mr32042240pjb.44.1561994643258; Mon, 01 Jul 2019 08:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561994643; cv=none; d=google.com; s=arc-20160816; b=kXigZSkb42QcB4TLSYo/qAV7rFUx97vqRuOCDjwEituHl1MbS/eoM/vkXVFa+ybphX NXnI7YucWM77UBNSaynaQuyoUYGZya3hrCsglxNGyHhB4A7zO0UD6056SA7zVtBBeYgg nX1yQL3Mwp9oI1aIEn5eQxQ5y8Gol4yI1Gxj9os3Gk6mv2kMuD/iymyJ7sqeLU4OxVzA cYAMEGHQVhCdfhd0fPr5V17qEFQVR2uA2Vfb/aL6YlMIhca1HqXI4cyzceg2O2KY8MgH Z3l588FIJtiDqneYw4Urt5iwsZ/dxKCn5DhwoVaxpYUhoDkk/Ngd+zmzRB/LKPwtZ3zg f5CA== 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:dkim-signature; bh=afNqu/duuK9wJTjZbPueWefwBIXHOijfGxxZ9sdqRnQ=; b=nRO+97J7OT5A3Y6uQ3wif+8XTwwV19dPqIVnF7453vmfSTEm7PS7Mar6vcbWyA/cjk 4IPm9tShrx7y35cEBrd/VWfdVIvqBYPHVM/TlsIhTWEnIa64t/00YboqTqrqSgJZPBT2 BlxaEcXcouAxj4Wyrn+9X2RMnvkBLfMyEth18HK8YX9b8FVEO2/fLQ7y3QxKZQ2IBjY2 zcn9OHx5Rex0Zdx40EmzDqvNJCQBMf1Fja9E3zokdhr99vimG0Sj5q/+kgb4GKgjn6C0 JYuh5iaXFm76fB7th8Hxkm8g10lIwyEfAPLrWQvKAxCxKCaXTjfGdFC7K2sf6g3f7+7V u/mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=q1EXwTG4; 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 m3si11283537pld.40.2019.07.01.08.23.46; Mon, 01 Jul 2019 08:24:03 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=q1EXwTG4; 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 S1729311AbfGAOBX (ORCPT + 99 others); Mon, 1 Jul 2019 10:01:23 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:50212 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727031AbfGAOBX (ORCPT ); Mon, 1 Jul 2019 10:01:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=afNqu/duuK9wJTjZbPueWefwBIXHOijfGxxZ9sdqRnQ=; b=q1EXwTG4IJbKO+kQhc70xhFLZ zx4OCyUxNDvnpQzcKOkkzn63y1QkqNmFWfh53S3jS3iEdiVAD5zrS3iN0Yc5WtNQTUhALi5BR9kr7 Ts0K7a+gmFwsemaJV6qgp6jEfJNtjTWmSz57A3cBzms/myhXugJx0aYIv4dJ5gB5sbEV66IXddxmW xe2WKaCnIqqMBnHLtiH+aI4AL5uy+XjXmjkYUtPHnNaCITPxRsAN3AzJgptIkKXGbd8J/6FvPDorU RrjrAzJwX+ePwqkpviUHdyT163GtfmimDS+5sj5RryHa8O/OekqcXnZH1SyiUrXZM34pIdJHldHAs WZpE54ufA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hhwrX-0004zz-Io; Mon, 01 Jul 2019 14:00:55 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C9D6720963E23; Mon, 1 Jul 2019 16:00:53 +0200 (CEST) Date: Mon, 1 Jul 2019 16:00:53 +0200 From: Peter Zijlstra To: "Paul E. McKenney" Cc: Sebastian Andrzej Siewior , Scott Wood , Joel Fernandes , Steven Rostedt , rcu , LKML , Thomas Gleixner , Ingo Molnar , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan Subject: Re: [RFC] Deadlock via recursive wakeup via RCU with threadirqs Message-ID: <20190701140053.GV3402@hirez.programming.kicks-ass.net> References: <20190627184107.GA26519@linux.ibm.com> <13761fee4b71cc004ad0d6709875ce917ff28fce.camel@redhat.com> <20190627203612.GD26519@linux.ibm.com> <20190628141522.GF3402@hirez.programming.kicks-ass.net> <20190628155404.GV26519@linux.ibm.com> <20190628160408.GH32547@worktop.programming.kicks-ass.net> <20190628172056.GW26519@linux.ibm.com> <20190701094215.GR3402@hirez.programming.kicks-ass.net> <20190701102442.35grdpcsbrwyyaco@linutronix.de> <20190701122305.GB26519@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190701122305.GB26519@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 01, 2019 at 05:23:05AM -0700, Paul E. McKenney wrote: > On Mon, Jul 01, 2019 at 12:24:42PM +0200, Sebastian Andrzej Siewior wrote: > > On 2019-07-01 11:42:15 [+0200], Peter Zijlstra wrote: > > > I'm not sure if smp_send_reschedule() can be used as self-IPI, some > > > hardware doesn't particularly like that IIRC. That is, hardware might > > > only have interfaces to IPI _other_ CPUs, but not self. > > > > > > The normal scheduler code takes care to not call smp_send_reschedule() > > > to self. > > > > and irq_work: > > 471ba0e686cb1 ("irq_work: Do not raise an IPI when queueing work on the local CPU") > > OK, so it looks like I will need to use something else. But thank you > for calling my attention to this commit. I think that commit is worded slight confusing -- sorry I should've paid more attention. irq_work _does_ work locally, and arch_irq_work_raise() must self-IPI, otherwise everything is horribly broken. But what happened, was that irq_work_queue() and irq_work_queue_on(.cpu = smp_processor_id()) wasn't using the same code, and the latter would try to self-IPI through arch_send_call_function_single_ipi(). Nick fixed that so that irq_work_queue() and irq_work_queue_on(.cpu = smp_processor_id() now both use arch_raise_irq_work() and remote stuff uses arch_send_call_function_single_ipi().