Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2403691ybl; Thu, 29 Aug 2019 07:45:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqydTwZf4rfE4n+uLy2GeoXDaTKZOWX5cQ6L1PqEpnVcy56nSZMQL97SJ/y5Pan3NozPLlEL X-Received: by 2002:aa7:8b46:: with SMTP id i6mr11634928pfd.190.1567089914885; Thu, 29 Aug 2019 07:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567089914; cv=none; d=google.com; s=arc-20160816; b=ucMU5aVam3fcEZfNw4Q+0icTZH+SrygKpLjGDB1RG8f6/JrCAKiK48pvmhNfP5x6h4 lcz1Qkm2IdvD3AsHld/bhi4sZzeEgHKlkipj8cayoybvJtCYGZNYUCW1WgkWqsVCHc+l viR0tKzZn6L6zKkGZ1hEfJkTCUIGbT7JKCvHPuwccj5GIpcatSUoO/3LGjxmMSYU6SXo hjKzHbPgPnBJBcFEE5yRr3RSlxdLbA4smeDrokeoe/uVGEnbvIWDN6TshB31Vw8m6m06 6MVdT5lH4blO+iaOBNGxI/f4basDLJEwOzHi0SzrO91MIHfxlX1yeTbzAeztcBDqJ7ap 1pNg== 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; bh=1jbNDnatKqrZZbvhaAxgomk5lFvDz0GUQU4rtuS0hzg=; b=f+3XDvHBcJfTBIyz8UVU1bFq6asHfBmAqKM/+kMuxwe+JYxNLiSm6EzZas5Pztn7lh I02QXP+yZH19AMRqeG12it+iRWl+kiLdAvGXm0b/ZqmXYJnjYkiZZBynfPWHcmAPWaqf oyQ1d24rDMaP8dcVmunsRojI3GmcJw3Opjs7tUvjkhqDn03swaqWqSXnC1RptYeUan9P FSuWvCIZD/hUkC9bT1vxnckQ6gptWKt6MLlW0YFEJCzRqJxwNub45Ue7YK6g6GJRoj4U Qw3HeMuOdmkWUhrZpAs0XlMnLnVWVXzaljiVrmcHcTjeXT5CmhgNDyBcp6KthfGG/iT9 encA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=pws3InZS; 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 j18si2095492pgh.186.2019.08.29.07.44.56; Thu, 29 Aug 2019 07:45:14 -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=pws3InZS; 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 S1727929AbfH2On7 (ORCPT + 99 others); Thu, 29 Aug 2019 10:43:59 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:45926 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726518AbfH2On6 (ORCPT ); Thu, 29 Aug 2019 10:43:58 -0400 Received: by mail-pl1-f194.google.com with SMTP id y8so1670466plr.12 for ; Thu, 29 Aug 2019 07:43:57 -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=1jbNDnatKqrZZbvhaAxgomk5lFvDz0GUQU4rtuS0hzg=; b=pws3InZSGoRYhnY0msy/KI8nH8nUy9PWXFaj3FcNG/GZCigAofnwgs5fjrQ8Da9fqU LNpQeOlxbcmYSt6Uaj1LSagZSEqFQ2qS4K/en9qTys+ZgKZrM0ZGqrZ4NHMOsNDFBuXF 4uZe3hiSoi6hgUH6GDDOvCVr2tIEgef6i48qQ= 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=1jbNDnatKqrZZbvhaAxgomk5lFvDz0GUQU4rtuS0hzg=; b=TO38Hnd55KMW6h+AU3njrovPhSrVzVGM23mqI2VPQDwcFVrxL4AXFkzCSbLYSRQP+S lhVJ2fGr8WBxkwG5QWcG/n7CA4upIUTmSIgxNCoGSNpEOAEBGWBgjUPoKDEgY0DMMefG CRJKejEJbr29oV8GS3lXQGV4AUH0EdgDLg5N0sXKNmJky/eKIUZF/k5xdVfZq5cg+nR4 AXen1qgEFyTkfZb8pgsnrTUdmxJBUCLL8hN2OPLZ+Xa9c2ZNDGO7FACHnS+Zt214QhJX 1qgRt0WVr05sbhnSZFwJpq5Yc65cftpDmS4rLcufloALetjKZRlS3cZYGSOm+lfc/E4B SCnA== X-Gm-Message-State: APjAAAVRRNvBuUZlRBCaPdAnOrCJXZLa4nGrymIyo7iqUWZWxpe6zKpU avAW3SAWDjbmGl4NKhqVMgEMyQ== X-Received: by 2002:a17:902:126:: with SMTP id 35mr2476290plb.76.1567089837473; Thu, 29 Aug 2019 07:43:57 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id ev3sm16452782pjb.3.2019.08.29.07.43.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 07:43:56 -0700 (PDT) Date: Thu, 29 Aug 2019 10:43:55 -0400 From: Joel Fernandes To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, Frederic Weisbecker , Jonathan Corbet , Josh Triplett , kernel-team@android.com, Lai Jiangshan , linux-doc@vger.kernel.org, Mathieu Desnoyers , Mauro Carvalho Chehab , rcu@vger.kernel.org, Steven Rostedt Subject: Re: [RFC v1 2/2] rcu/tree: Remove dynticks_nmi_nesting counter Message-ID: <20190829144355.GE63638@google.com> References: <5d648897.1c69fb81.5e60a.fc70@mx.google.com> <20190828202330.GS26530@linux.ibm.com> <20190828210525.GB75931@google.com> <20190828211904.GX26530@linux.ibm.com> <20190828214241.GD75931@google.com> <20190828220108.GC26530@linux.ibm.com> <20190828221444.GA100789@google.com> <20190828231247.GE26530@linux.ibm.com> <20190829015155.GB100789@google.com> <20190829034336.GD4125@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190829034336.GD4125@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 28, 2019 at 08:43:36PM -0700, Paul E. McKenney wrote: [snip] > > > > > This change is not fixing a bug, so there is no need for an emergency fix, > > > > > and thus no point in additional churn. I understand that it is a bit > > > > > annoying to code and test something and have your friendly maintainer say > > > > > "sorry, wrong rocks", and the reason that I understand this is that I do > > > > > that to myself rather often. > > > > > > > > The motivation for me for this change is to avoid future bugs such as with > > > > the following patch where "== 2" did not take the force write of > > > > DYNTICK_IRQ_NONIDLE into account: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?h=dev&id=13c4b07593977d9288e5d0c21c89d9ba27e2ea1f > > > > > > Yes, the current code does need some simplification. > > > > > > > I still don't see it as pointless churn, it is also a maintenance cost in its > > > > current form and the simplification is worth it IMHO both from a readability, > > > > and maintenance stand point. > > > > > > > > I still don't see what's technically wrong with the patch. I could perhaps > > > > add the above "== 2" point in the patch? > > > > > > I don't know of a crash or splat your patch would cause, if that is > > > your question. But that is also true of the current code, so the point > > > is simplification, not bug fixing. And from what I can see, there is an > > > opportunity to simplify quite a bit further. And with something like > > > RCU, further simplification is worth -serious- consideration. > > > > > > > We could also discuss f2f at LPC to see if we can agree about it? > > > > > > That might make a lot of sense. > > > > Sure. I am up for a further redesign / simplification. I will think more > > about your suggestions and can also further discuss at LPC. > > One question that might (or might not) help: Given the compound counter, > where the low-order hex digit indicates whether the corresponding CPU > is running in a non-idle kernel task and the rest of the hex digits > indicate the NMI-style nesting counter shifted up by four bits, what > could rcu_is_cpu_rrupt_from_idle() be reduced to? > > > And this patch is on LKML archives and is not going anywhere so there's no > > rush I guess ;-) > > True enough! ;-) Paul, do we also nuke rcu_eqs_special_set()? Currently I don't see anyone using it. And also remove the bottom most bit of dynticks? Also what happens if a TLB flush broadcast is needed? Do we IPI nohz or idle CPUs are the moment? All of this was introduced in: b8c17e6664c4 ("rcu: Maintain special bits at bottom of ->dynticks counter") thanks, - Joel