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=-7.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 C98A2C3A59F for ; Thu, 29 Aug 2019 14:43:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D3C622CED for ; Thu, 29 Aug 2019 14:43:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b="pws3InZS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727779AbfH2On6 (ORCPT ); Thu, 29 Aug 2019 10:43:58 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:34193 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727691AbfH2On6 (ORCPT ); Thu, 29 Aug 2019 10:43:58 -0400 Received: by mail-pl1-f193.google.com with SMTP id d3so1695464plr.1 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=j0a459L4HO/76Vb/5LjQRJQbrZBuvPn0XvfguENL/McIZmqRI5KRSYztRfdLgo4W4c 7zc77k4J81Gjr75ekGrn4QIF4WKa+Pj/zbYdDSQLBom7GmNuYclKJArr3HnqZXs6fCMN s17qC0WsAOL9LbbnwsTecSWui5DJwLGrsHEp2NgEd5njU2vWZEFph3dJnGlItBl/b9aA /KLI28OorZMdympkYUNQt2Se2WeKT2pm48bJwrD6pTBYXNQYFVb9TfSSZAFg2+P68FZ/ Uwt4S1RB+6+d+99aKn9BX32dyV8ll/nNK42TfI3VPqf4LBk57n6OL7Jn/Rr3coyOwQgU FQKQ== X-Gm-Message-State: APjAAAVFIcSzwe98UapuHzJc3Z/iyUTezxpWQxmqNpi2moWt1JnIGlVA OLSDoX2A5c28FssufyiU0eM6jw== X-Google-Smtp-Source: APXvYqxMzTPU8bK6VjApFdjKL0gEBlWweOLhLYTEdCnvF7eVDYTr1s/5dEscVTxlZWsL0uFq/aCAzw== 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: rcu-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: rcu@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