Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2474690imm; Sat, 23 Jun 2018 20:02:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIuqxmNe5oweSg96wG7CinxqAccWyZaf0n8rQzPj6dgfSC8SgvK8c2yU1AlmuW3W0MjMJCe X-Received: by 2002:a62:ba13:: with SMTP id k19-v6mr7687996pff.245.1529809376853; Sat, 23 Jun 2018 20:02:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529809376; cv=none; d=google.com; s=arc-20160816; b=gzqcTwAArnR9kPpjEZcNw/wpK09OVi7JooX11My3qMVfDoRRYro9d10t1CE1nopx2a pu30KJAJDX/wugEHtlWl7CXbso38GAiQT0yYfW9fzVdJTOdjREGMsBur+oJ3gNcA8fDa PO/oXUipdRa+z0fRd0pwQPhr8wc+heugMT+9IihTAgiliWz/Zu/ScF6M1/faJNoxG9HH GMKoJZu/tEcAZ8CNZwOuRNNYMLyu5plrxE439FVDz7rZn1O+TxiWqRSs2CYGmeDG5S5S 5p74qy57e0wDpDHd2/eeeW5LoZhulhselK7qfeJ8cF0sPT2GSySO+RygNW7Gn/dkYkNN kQMw== 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:arc-authentication-results; bh=92ry53j5zijOF9aqo904mXvJZY7mEqZyxe2rok6cO/s=; b=m8dkhnIkaE6BjF98T3+z8FepdxBBw3p4ednnADz7QK7k4htytZJQ0i8QIhotFW4/MQ F/hUXCtEPkZbMKgFp2sqn5tcaK32rUDKmnwSA14IMIg2D5/w7Yya4t3/3OncZXuZKEwQ ixSY7Owj9kpgSTDIILhio//9/P/zpe7iKB83/6GJryIynLMxfALaRaeLgdiq6uBIXuhp bbLd8JLZ0j+pRFJxnve0/2LcXHtJqOB9QzRudI3KoMN0OCXYvHdSbYhQBlRTDTJ4GMWa oTxkXh8MuKqv2B2HL+2Me4lCH0ua6Zbr5jlkPIe6j7LImFf2Yj6joU2yO73oy+Tkdvpe oSww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=vwFpO9v4; 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 z23-v6si10455262pfh.266.2018.06.23.20.02.42; Sat, 23 Jun 2018 20:02:56 -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=@joelfernandes.org header.s=google header.b=vwFpO9v4; 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 S1752249AbeFXDCF (ORCPT + 99 others); Sat, 23 Jun 2018 23:02:05 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:43882 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752113AbeFXDCE (ORCPT ); Sat, 23 Jun 2018 23:02:04 -0400 Received: by mail-pg0-f67.google.com with SMTP id a14-v6so4576301pgw.10 for ; Sat, 23 Jun 2018 20:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=92ry53j5zijOF9aqo904mXvJZY7mEqZyxe2rok6cO/s=; b=vwFpO9v4qxQGhwqgbihUaNGieqFQ51X/ihTEGzfoSEkTnNULpDcqa2kpIScqF9iI+g E96l3/d/IMc3dPU9D0bwH59HxhP3hYdtJpZ0TwUkAP9QK4jXOBQmNYR7fDss2KH6lLjr kkCUs4sNYVjop3+ImmaA3XJVSTLAyDFqfovoA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=92ry53j5zijOF9aqo904mXvJZY7mEqZyxe2rok6cO/s=; b=cjqstPvAX9MAh8DE+p/+an2WKnExix2PUz/v9G5sBb3jeOAVDdytjsA1Jkzd16zCQU +ltCk8kpGX2WY+1T5dQLMSujv/S/l9tCEfKSgOBwPkh+MdADOdW6rp48PV1vRodYLk/I 48aNC8LvDk+mu+OFJEnAcdQj07K1EV+aFaomREsZ+EbFL4VnWGVTRn77rH9DUlkRavO5 Zh/kXjtN2XbYp4/zNb+mbi+p7FzOHk/4AvRL4vWYk03MqulL3YuQj2SHOb/jIsirRLmL pw1DsG6Spe6njOkJDoZd7bHauiM2OoOmA4vBOwFrjsKwu4ayvdlnNKwGMcTyiTr40VKh JPoA== X-Gm-Message-State: APt69E3K2rtTAY4wVtguB0jdLmbI5on2mj+Q3qG/DEvWlqGygQyRmG1J K94N0GY/tzG/LFgR4Karj4l9Iw3igh0= X-Received: by 2002:a65:4587:: with SMTP id o7-v6mr6277288pgq.386.1529809323738; Sat, 23 Jun 2018 20:02:03 -0700 (PDT) Received: from localhost ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id v78-v6sm23476688pfd.64.2018.06.23.20.02.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Jun 2018 20:02:02 -0700 (PDT) Date: Sat, 23 Jun 2018 20:02:01 -0700 From: Joel Fernandes To: "Paul E. McKenney" Cc: Steven Rostedt , Byungchul Park , Byungchul Park , jiangshanlai@gmail.com, josh@joshtriplett.org, Mathieu Desnoyers , linux-kernel@vger.kernel.org, kernel-team@lge.com, luto@kernel.org Subject: Re: [RFC 2/2] rcu: Remove ->dynticks_nmi_nesting from struct rcu_dynticks Message-ID: <20180624030201.GA161749@joelaf.mtv.corp.google.com> 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> <20180622205813.GV3593@linux.vnet.ibm.com> <20180622170042.4adfbe21@gandalf.local.home> <20180622211600.GX3593@linux.vnet.ibm.com> <20180623154839.GA12939@joelaf.mtv.corp.google.com> <20180623175634.GI3593@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180623175634.GI3593@linux.vnet.ibm.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 23, 2018 at 10:56:34AM -0700, Paul E. McKenney wrote: > On Sat, Jun 23, 2018 at 08:48:39AM -0700, Joel Fernandes wrote: > > On Fri, Jun 22, 2018 at 02:16:00PM -0700, 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. > > > > Hi Paul, I am Ok with adding a warning for a couple of releases if you and > > others are Ok with it, how about something like this? Feel free to use the > > diff as a starting point or a different approach if you/others prefer > > something else. Thanks. > > A few years rather than a few releases, but yes. ;-) > The checks would need to go just before the "crowbar" stores. Ok. I guess that would work too. > I will put something together after Byungchul's patches in this area have > had time to burn in for a few days. Sounds great, thanks! - Joel