Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1344696imm; Fri, 22 Jun 2018 15:05:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKzCbrlHeql6obINOigYbye0b2dFGbizsEHR7p6YtNldFWbMFFju2l821hxPn8vVaNzXQox X-Received: by 2002:a63:9c02:: with SMTP id f2-v6mr2888413pge.16.1529705100621; Fri, 22 Jun 2018 15:05:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529705100; cv=none; d=google.com; s=arc-20160816; b=jb3P9RZadMTYMPI/5qzbBeAsu4ME4Jrcgfd1xMOVP9WJte/ghtZRDrG/axsVnX0Ami M/5DcRHOeiZWP2fCFXCN9XeNI/zmrZQkE4zpfqMRB4gU7/qIuiDUkXyPzi/JoBkV4QSc mNz6aHYi2LAVhXUgTzFxPyvMep5raIqu5SBxmld19cvDN4BC6UYTi4RsJkZuetvFT50T +Vwb7i2ZdmYjE/Kw3wtomxcnE8xwtoR2DitFEP5zYqPkqa/S+MuODJHCc5XHakvoA5j+ PjdcgGIfzuV8CRgkcod6W0G0+rpo9PYa29DPX7GvCm8ZNh5UZCZfIkVF13RXVl3CSCtm wMhQ== 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=g/hcWfYMviLyPwkotHNpQ4oVU/7MODtbKsHbvWu8lSI=; b=cKoKW1ZpRvggkOiwFcIuZGuyuTYFGnoA3KSqdtaYrTddy45DPR5uX7PQTaMt7olEVo uz1bfGfq5QNXl+8wFMJZaPEbN1DCPm1Czx+4dMxshf4HI6bLn61y4rYHZSlGTFR3JKXy 99DQZuxPAXDuEUugk4v8OxInU9Qbq+UUQXtMvBytIwZeY+TxT9YPzZGmud0edOgRttRd VeJ/XQhmtU1g8bWpXvWvym4V/weHm6105GpYOx4G5utWX4wJki3nSc7cxIX8ETkACKPf mzZP0FC6PWcWjrBI69o2ZGsbMOxf8J9EzehSJAKKfq2Q8OXQ9+uameFmCYJQRFThAz/l kprw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jvZ6Cast; 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 r9-v6si6849709pgp.591.2018.06.22.15.04.46; Fri, 22 Jun 2018 15:05:00 -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=jvZ6Cast; 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 S1754537AbeFVWDw (ORCPT + 99 others); Fri, 22 Jun 2018 18:03:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:49596 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754134AbeFVWDv (ORCPT ); Fri, 22 Jun 2018 18:03:51 -0400 Received: from mail-wr0-f173.google.com (mail-wr0-f173.google.com [209.85.128.173]) (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 557852494B for ; Fri, 22 Jun 2018 22:03:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1529705030; bh=y2LfsOkUy0geQhJWzpS7qq05B7nz1ufctTY8cqGV6Y4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jvZ6CastbE5+5FAryMQz3aEWMrVoOY2tzDD9CqWEXeb5W0NzCzIb4jW6vqU+RBwt/ 6MxgGRK4InS4ImaL132sab/ibqgzXsD9EFxr46m9UvIrAWD9qzk1qImkJgl/BUPEVq kEznuQbGq9k0qai+w+qAWLVtoaLTnKq08RRgRa64= Received: by mail-wr0-f173.google.com with SMTP id k6-v6so7997628wrp.4 for ; Fri, 22 Jun 2018 15:03:50 -0700 (PDT) X-Gm-Message-State: APt69E3YDpk99EDNeufN82uIU6L2RrYaFeXLuXstJ8pXSyo38w1TFIOV eI0jODSUfCACEX7t8vUcjOePSYavs5cXyQz0s+9rLA== X-Received: by 2002:adf:85ec:: with SMTP id 41-v6mr2905158wru.120.1529705028785; Fri, 22 Jun 2018 15:03:48 -0700 (PDT) MIME-Version: 1.0 References: <1529484440-20634-1-git-send-email-byungchul.park@lge.com> <1529484440-20634-2-git-send-email-byungchul.park@lge.com> <20180620145814.GQ3593@linux.vnet.ibm.com> <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> <20180622205813.GV3593@linux.vnet.ibm.com> <20180622170042.4adfbe21@gandalf.local.home> <20180622211600.GX3593@linux.vnet.ibm.com> In-Reply-To: <20180622211600.GX3593@linux.vnet.ibm.com> From: Andy Lutomirski Date: Fri, 22 Jun 2018 15:03:35 -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, max.byungchul.park@gmail.com, 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 Fri, Jun 22, 2018 at 2:14 PM Paul E. McKenney wrote: > > On Fri, Jun 22, 2018 at 05:00:42PM -0400, Steven Rostedt wrote: > > On Fri, 22 Jun 2018 13:58:13 -0700 > > "Paul E. McKenney" wrote: > > > > > Something like this: > > > > > > IRQ entered > > > > > > And never exited. Ever. I actually saw this in 2011. > > > > I still believe this was actually a bug. And perhaps you made the RCU > > code robust enough to handle this bug ;-) > > Welcome to my world! > > But I recall it being used in several places, so if it was a bug, it > was an intentional bug. Probably the worst kind. > > Sort of like nested NMIs and interrupts within NMI handlers. ;-) > > > > Or something like this: > > > > > > IRQ exited > > > > > > Without a corresponding IRQ enter. > > > > > > The current code handles both of these situations, at least assuming > > > that the interrupt entry/exit happens during a non-idle period. > > > > > > > > So why this function-call structure? Well, you see, NMI handlers can > > > > > take what appear to RCU to be normal interrupts... > > > > > > > > > > (And I just added that fun fact to Requirements.html.) > > > > > > > > Yes, I'll definitely go through all the interrupt requirements in the doc and > > > > thanks for referring me to it. > > > > > > My concern may well be obsolete. It would be good if it was! ;-) > > > > I'd love to mandate that irq_enter() must be paired with irq_exit(). I > > don't really see any rationale for it to be otherwise. If there is a > > case, perhaps it needs to be fixed. > > Given that the usermode helpers now look to be common code using > workqueues, kthreads, and calls to do_execve(), it might well be that > the days of half-interrupts are behind us. > > But how to actually validate this? My offer of adding a WARN_ON_ONCE() > and waiting a few years still stands, but perhaps you have a better > approach. I think you should add a WARN_ON_ONCE(). Let's get the bugs fixed. --Andy