Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3445162ybd; Fri, 28 Jun 2019 08:45:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzc5dv8rHk+UMqTA7eNQd+pTMR4HrEwXCEzV5BtzzemPBelIS5sjDS2HJ00ALfh+cp5jfqT X-Received: by 2002:a63:4185:: with SMTP id o127mr9533524pga.82.1561736703560; Fri, 28 Jun 2019 08:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561736703; cv=none; d=google.com; s=arc-20160816; b=mjg9SbA89zhoyk596WI0ovbQYuOOq3At/ZyZzT5r/QnalA/LH5FltPGTO4WMEzwHY3 bibPsHGhAq5x7Z9fqTf/Nnic0bizWydsXS57V5L5ML3LSf4V3xluhV9djxEG811BAt6f 30HpH6njLCsd/dl2qm+KDaJMi5KkZCsAJrrTOZMlQVKwkHxnfhwsdCiurC99+cXSJS8y NoE4gJ6AAfjLBowRU3PYDsGoMgqaRruEJw2uiy0xoY3299K/s2y6OLFH9+csUyuPDix5 FUAAOL8A1CQYYPzS/Vm6BHOS5REjq0rj48bd4Ma+0AOzac+9tRHVnmDQl+ap4N7xD3iS 6+kw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=1s4nJ/Cwzmx01EIpZdbUhnlS+A6XFIlthXxU3tRwdPc=; b=TucQ7OrfOX0ByLyn5hWLxNvxRqTvNwJPt9gpw6fW3NTjM94WXvEyffSoxa7Jr07TrU x+fZWz5fu99oftEpG7A0HvG4CiGyOqI+/KywkPU28ASbFiEIKGaTPDoc8IbsS96HSzET fJ9ksRY2vhRJ4iInG9rMM7CrReF9Oslx9D/zIYRLjtKgRNFdVonhXSUsFiK/YkEsOgvi weKuyBR1IlSaO+IF6U3RsRPkWEd9Ym+2nLhgKGkMigyuhXsQtLQq8x8zAOswpyZR/YRa UHCCmER2my/XXXUlzaYHH++WTzZcDi7GyZDgXfGG5lzkMd+fs9RzHOsTgLxJWJoc1Nc+ 8DZA== 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 l123si1358640pfl.216.2019.06.28.08.44.47; Fri, 28 Jun 2019 08:45: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; 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 S1726940AbfF1PoQ (ORCPT + 99 others); Fri, 28 Jun 2019 11:44:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:55318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726657AbfF1PoP (ORCPT ); Fri, 28 Jun 2019 11:44:15 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 61BDE214DA; Fri, 28 Jun 2019 15:44:13 +0000 (UTC) Date: Fri, 28 Jun 2019 11:44:11 -0400 From: Steven Rostedt To: Byungchul Park Cc: "Paul E. McKenney" , Scott Wood , Joel Fernandes , Sebastian Andrzej Siewior , 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: <20190628114411.5d9ab351@gandalf.local.home> In-Reply-To: <20190628104045.GA8394@X58A-UD3R> 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> <13761fee4b71cc004ad0d6709875ce917ff28fce.camel@redhat.com> <20190627203612.GD26519@linux.ibm.com> <20190628073138.GB13650@X58A-UD3R> <20190628104045.GA8394@X58A-UD3R> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 28 Jun 2019 19:40:45 +0900 Byungchul Park wrote: > Wait.. I got a little bit confused on recordering. > > This 'STORE rcu_read_lock_nesting = 0' can happen before > 'STORE rcu_read_unlock_special.b.exp_hint = false' regardless of the > order a compiler generated to by the barrier(), because anyway they > are independent so it's within an arch's right. > > Then.. is this scenario possible? Or all archs properly deal with > interrupts across this kind of reordering? As Paul stated, interrupts are synchronization points. Archs can only play games with ordering when dealing with entities outside the CPU (devices and other CPUs). But if you have assembly that has two stores, and an interrupt comes in, the arch must guarantee that the stores are done in that order as the interrupt sees it. If this is not the case, there's a hell of a lot more broken in the kernel than just this, and "barrier()" would also be meaningless, as that is used mostly to deal with interrupts. -- Steve