Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4327651imm; Mon, 25 Jun 2018 13:50:29 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIInLFq+Am3KRDyMxT1wutqPD+3PHqAUwgAWb/2IIK9tsbUjFwKOb7/xoICrZsfzAdWydkd X-Received: by 2002:a17:902:ac88:: with SMTP id h8-v6mr13840436plr.17.1529959829631; Mon, 25 Jun 2018 13:50:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529959829; cv=none; d=google.com; s=arc-20160816; b=N5pZ01IjhNKYs2TGr5l5SfQ29orD4NXokLy9NjwLgf+NNGtAtTAvOK1SY0MJD5QVWH 6NFp9wmEDn4F9nbGhsMJfz7uFXCiaNP28ms+rDMy95x5/vkNeVLB71t4i+Gs066XS9Th QbJPI9M3qSHOhUSz4K4XMiDLoxA/dlPhsAc97HlJ4XbG9P3Y3gtbowIgioTDPdz61AKV wAZjlBjYVTUx3DOFvm9WPvtBY2Wjjy+5WYKhYGIT2PLcOtVSgI+1gyDgew725sGNOIGi WohueWcbrZey9Z5m6FGB01oPBEdUVUn+wqQws5DlV4ZU4rqll1dQr4iUytspIEy8pOHN 6ZEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=B0PzFrTjd68U4o2quEPKh5a3H2Y/7qUVrFFck+xZ+IM=; b=BWEWGWU1HDmrwohgOtP+zY4zFU2R60Q3cyhkdaC+bqzE2TmhhZAGRl+N6ZVA1bJAyK E1m1PxAiGjUCtNgqXy+ewn0Q+9UQgDhGiAsR4UlNponBXhgEMJ1/Vtj7DU/k5Bwvx9gy sCmLJ6qS0WbZVjW0QMp0XWXEsX0KdSeg4RvVORaiRhWnbeh4dutjY6EhJ5yhmLk/fedI 3Twju+i2ydxWNFzz5B/smnFEroLs/w1pNZBYCq/fGRxyb0W/o4ATIM0tH3berdQSyYOV aS1d4YFqdgO2udpD5OsDoR6V2bnDN3KOH5SLtzuhjxaohI7Csn8aglG5PqoZXqEOrzcJ ZxSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NsnQ04qZ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1-v6si5985485plj.334.2018.06.25.13.50.14; Mon, 25 Jun 2018 13:50:29 -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=pass header.i=@kernel.org header.s=default header.b=NsnQ04qZ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965189AbeFYUsD (ORCPT + 99 others); Mon, 25 Jun 2018 16:48:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:35468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965146AbeFYUsC (ORCPT ); Mon, 25 Jun 2018 16:48:02 -0400 Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7A5292610E for ; Mon, 25 Jun 2018 20:48:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1529959681; bh=294uciUUEUAMkCq5233yM2QE7X16xEz5TYtKpTXjHFY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NsnQ04qZwGOaJPaLY314IGAWNiwzpgU7vDQNAEfhc7QZH6EENEDyO1uhgWaz+dfha 4OrRFdYvAQI++awOTJLk9V8F9PJU1R26gmAytzOus8aymITuoszcFzoSjZRs2DePGu KcD4JsFCCVyByNChUpQjx6TtDNo+SXjhoDpHGZBE= Received: by mail-wm0-f51.google.com with SMTP id p126-v6so10755978wmb.2 for ; Mon, 25 Jun 2018 13:48:01 -0700 (PDT) X-Gm-Message-State: APt69E0ZBIdg/kYfCbnw3EfYFE3Y1QDCmJpcoThrgqoV69ccEP1fBKAA 71nJ/tpQu2XOMmXxEcReai4KS4dgONwS0JQYHNzXrA== X-Received: by 2002:a1c:34c9:: with SMTP id b192-v6mr2162147wma.21.1529959679916; Mon, 25 Jun 2018 13:47:59 -0700 (PDT) MIME-Version: 1.0 References: <20180620164902.GW3593@linux.vnet.ibm.com> <20180622055659.GA255098@joelaf.mtv.corp.google.com> <20180622132843.GN3593@linux.vnet.ibm.com> <20180622181916.GA13628@joelaf.mtv.corp.google.com> <20180622143247.781028b1@gandalf.local.home> <20180622200548.GA114655@joelaf.mtv.corp.google.com> <20180625082824.GB21377@X58A-UD3R> <20180625163951.GA52646@joelaf.mtv.corp.google.com> <20180625162557.7140664c@gandalf.local.home> <20180625204708.GS3593@linux.vnet.ibm.com> In-Reply-To: <20180625204708.GS3593@linux.vnet.ibm.com> From: Andy Lutomirski Date: Mon, 25 Jun 2018 13:47:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC 2/2] rcu: Remove ->dynticks_nmi_nesting from struct rcu_dynticks To: "Paul E. McKenney" Cc: Steven Rostedt , joel@joelfernandes.org, Byungchul Park , byungchul park , Lai Jiangshan , Josh Triplett , Mathieu Desnoyers , LKML , kernel-team@lge.com, Andrew Lutomirski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 25, 2018 at 1:45 PM Paul E. McKenney wrote: > > On Mon, Jun 25, 2018 at 04:25:57PM -0400, Steven Rostedt wrote: > > On Mon, 25 Jun 2018 09:39:51 -0700 > > Joel Fernandes wrote: > > > > > For whatever its worth, I made some notes of what I understood from reading > > > the code and old posts because I was sure I would otherwise forget > > > everything: > > > http://www.joelfernandes.org/linuxinternals/2018/06/15/rcu-dynticks.html > > > > Nice write up. I may point some people to this ;-) > > > > Anyway "complications due to nested NMIs (yes NMIs can nest!)" > > > > What arch allows for NMIs to nest. Because we don't let that happen on > > x86, and there's code that I know of that is called by NMIs that is not > > re-entrant, and can crash if we allow for NMIs to nest. For example > > "in_nmi()" will not show that we are in_nmi() if we allow for nesting > > of NMIs. It has a single bit that gets incremented when we enter NMI > > code, and cleared when we leave it. > > Last I checked with Andy Lutomirski, there are a number of things that, > though not NMIs, act like NMIs and that can interrupt each others' > handlers. This is on x86. > As a straightforward example, NMI and MCE can nest inside each other. IIRC we treat #DB somewhat NMI-ish-ly as well. --Andy > Thanx, Paul >