From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E13CDC0650F for ; Sun, 30 Jun 2019 23:56:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C38E8214AF for ; Sun, 30 Jun 2019 23:56:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727284AbfF3X4M (ORCPT ); Sun, 30 Jun 2019 19:56:12 -0400 Received: from lgeamrelo11.lge.com ([156.147.23.51]:34181 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727265AbfF3X4M (ORCPT ); Sun, 30 Jun 2019 19:56:12 -0400 Received: from unknown (HELO lgemrelse7q.lge.com) (156.147.1.151) by 156.147.23.51 with ESMTP; 1 Jul 2019 08:56:10 +0900 X-Original-SENDERIP: 156.147.1.151 X-Original-MAILFROM: byungchul.park@lge.com Received: from unknown (HELO X58A-UD3R) (10.177.222.33) by 156.147.1.151 with ESMTP; 1 Jul 2019 08:56:10 +0900 X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Mon, 1 Jul 2019 08:55:25 +0900 From: Byungchul Park To: Steven Rostedt 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: <20190630235525.GA23795@X58A-UD3R> References: <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> <20190628114411.5d9ab351@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190628114411.5d9ab351@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 28, 2019 at 11:44:11AM -0400, Steven Rostedt wrote: > 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. Clear. Dear Paul and Steve, Thank you. > -- Steve