Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1027900imm; Wed, 20 Jun 2018 10:20:28 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIoXSzc87UzsMoc8gsotucQTk9MnxsC2U8+zJEFBTRWFQUeRJUj2UFt3LLFKu1y+5YkRbcV X-Received: by 2002:a65:450c:: with SMTP id n12-v6mr19730000pgq.242.1529515228657; Wed, 20 Jun 2018 10:20:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529515228; cv=none; d=google.com; s=arc-20160816; b=fUZyKsyIy6cmxPpm0I+WM+YNkpZctL7g0XKgRirWuwMkxfFA6yKFOz7LHZdU7YICGF iM8vlW+OUgh1bsv29CdgnbLyuTInCYdhwYQmarWG/BjRNho6EX2pWKdOAzlRzd51zrhZ AagCKPuwVuWsgT4UKMiGh0jDQktJPByYZWGmhnrL2Dlal21HhnTN58MGFCi1r9x9U3JC fnExKYwb1mA+5x8vZzgs5skhvjqwcT6C2NfnGlykGOLuf/a+IVN0rEi0RyMjyRWZYLKV Dqrnw1uO27aV0L/x9W/VkTV5CWCk8btyoL3/eFSv/EQLnOVzkTdXPD324d/7eVfZio8p I8/g== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=dPmNaPzhp65HlzELLdqo7kzurA1fq8VrfyzeIAXWSi0=; b=Ggoso6EWWVp6QbcbX8oFJZGnCokqbdGJ9bTcugSeGYSdOSypfyx9RS8yZp5lxNl2Nl kGoGEwVmZfF391jOoQ4eMYJEmdH0+81r2zXEZkFjerljW2MdwR44cRgl2PrtVVA6L4L+ 4vs8IFcrF3pGSzdIyDQVYgwy4yFoeFJB43IQFk2yugcq7iSemGQhF8+XRjmSOZFqlS2U YsccuBa+/FmduK0owbQNuVmGDkXoHcroM9S91qWbMOczFzsS2vf6j1wCiw23AJGksrbg h2OI9hgNlZrXyWTetQI14SDE8PXgLx4EwsXPje3P2LO2fRKE6vbuhiNtBfRhYQLdQulb yv7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QgoDMk60; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r10-v6si1490922pge.353.2018.06.20.10.19.44; Wed, 20 Jun 2018 10:20:28 -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=@gmail.com header.s=20161025 header.b=QgoDMk60; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754369AbeFTRPK (ORCPT + 99 others); Wed, 20 Jun 2018 13:15:10 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:37408 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754059AbeFTRPJ (ORCPT ); Wed, 20 Jun 2018 13:15:09 -0400 Received: by mail-lf0-f65.google.com with SMTP id g21-v6so444352lfb.4 for ; Wed, 20 Jun 2018 10:15:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dPmNaPzhp65HlzELLdqo7kzurA1fq8VrfyzeIAXWSi0=; b=QgoDMk600GjubEi+mZKdt4KP9c49WWTMMjjzfYvQGDaJa94U1BVCu0MqQGeMW2ZAj0 iWVrlytC2t7KVy2tiSVlJazTKtfU0g09H0cjWXdXORncmTy5Jd5cifVyu0pZXRSPTULA l0EyfPktNgl3rI8+uwoKsu3elil7j/FSqaBT5QbM03bhAeYnF9gZusdZXou5D4eCOWXF vApDgcH2cWQWHR4HOLgxk7Y8myUgP5LOsPcH0QY+g3Pn/UAHQyGe/ULYA6pKc1F2bPjo YSwTDhi+BdggDQZA7mujanOZ0x74sYAhIqnaRazCaCofWt0zMZ8SnhOAGfu/TpEdIZJT dJaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dPmNaPzhp65HlzELLdqo7kzurA1fq8VrfyzeIAXWSi0=; b=pQl7d+f0HmrVzxVCjDHMqtv+JVfA76JQs0shxiLzDhJhp4O52aeMxFQ9pfRLg8Kgzj fY/5g6zRRhkjNlfUkoFKR4JhKe0Uqp12iWje/DsGZ6YJJh6hFaBiNtzYrZIBY8EeZwBc DX4pGoUgZ7NHttP444932KHxrSTLsnjj5RJGY51lTxxPMRou2FRndK3Z4a9fuLT3IL8Q lo5oDDSamHLTjszUzWZMn84sokL2ebTVTLIEsl3+9ppUqXdgK0wRueLWdWNA9ULgjoiQ kR47aIo+iNrn+ZlvVdEsHAc/W/23368q+CdVygTlkX5dsDx7XNSzmE1mrg4VL71W/O5O pbmg== X-Gm-Message-State: APt69E0MdY9ZdQJcZJ8+28HDOccCsOnIzEWJiNdUzkcRfYsEvz3+5AkS EK1f2IHvR7CmAxZyBkwk2RzHigPSWt9ETcKAX5I= X-Received: by 2002:a2e:3810:: with SMTP id f16-v6mr15985846lja.25.1529514907912; Wed, 20 Jun 2018 10:15:07 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab3:44ec:0:0:0:0:0 with HTTP; Wed, 20 Jun 2018 10:15:07 -0700 (PDT) In-Reply-To: <20180620164902.GW3593@linux.vnet.ibm.com> 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> From: Byungchul Park Date: Thu, 21 Jun 2018 02:15:07 +0900 Message-ID: Subject: Re: [RFC 2/2] rcu: Remove ->dynticks_nmi_nesting from struct rcu_dynticks To: Paul McKenney Cc: Byungchul Park , jiangshanlai@gmail.com, josh@joshtriplett.org, Steven Rostedt , Mathieu Desnoyers , linux-kernel@vger.kernel.org, kernel-team@lge.com, Joel Fernandes , luto@kernel.org 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 Thu, Jun 21, 2018 at 1:49 AM, Paul E. McKenney wrote: [...] > Perhaps the fact that there are architectures that can enter interrupt > handlers and never leave them when the CPU is non-idle. One example of > this is the usermode upcalls in the comment that you removed. > > Or have all the architectures been modified so that each and every call to > rcu_irq_enter() and to rcu_irq_exit() are now properly paired and nested? > > Proper nesting and pairing was -not- present in the past, hence the > special updates (AKA "crowbar") to the counters when transitioning to > and from idle. Thank you very much for explaining it in detail. > If proper nesting and pairing of rcu_irq_enter() and rcu_irq_exit() > is now fully in force across all architectures and configurations, the > commit log needs to say this, preferably pointing to the corresponding > commits that made this change. Right. > There is a call to rcu_irq_enter() without a corresponding call to > rcu_irq_exit(), so that the ->dynticks_nesting counter never goes back to > zero so that the next time this CPU goes idle, RCU thinks that the CPU > is still non-idle. This can result in excessively long grace periods > and needless IPIs to idle CPUs. No doubt. > But only if calls to rcu_irq_enter() and rcu_irq_exit() are now always > properly paired and nested, which was definitely -not- the case last > I looked. I missed it. Right. It's worth only in the case that calls to rcu_irq_enter() and rcu_irq_exit() are always properly paired and nested. > OK, so I can further consider this pair of patches only if > all architectures now properly pair and nest rcu_irq_enter() and > rcu_irq_exit(). It would be very good if they did, but actually testing > back in the day showed that they did not. If that has changed, that > would be a very good thing, but if not, this patch injects bugs. Totally agree with you. Sorry bothering you. -- Thanks, Byungchul