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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS 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 EF1A9C1B0F2 for ; Wed, 20 Jun 2018 15:43:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A39FF20875 for ; Wed, 20 Jun 2018 15:43:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A39FF20875 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754204AbeFTPni (ORCPT ); Wed, 20 Jun 2018 11:43:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:58690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752827AbeFTPnh (ORCPT ); Wed, 20 Jun 2018 11:43:37 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9BC6A2083A; Wed, 20 Jun 2018 15:43:36 +0000 (UTC) Date: Wed, 20 Jun 2018 11:43:35 -0400 From: Steven Rostedt To: "Paul E. McKenney" Cc: Byungchul Park , jiangshanlai@gmail.com, josh@joshtriplett.org, mathieu.desnoyers@efficios.com, linux-kernel@vger.kernel.org, kernel-team@lge.com, joel@joelfernandes.org Subject: Re: [RFC 1/2] rcu: Do prepare and cleanup idle depending on in_nmi() Message-ID: <20180620114335.7a314642@gandalf.local.home> In-Reply-To: <20180620145058.GP3593@linux.vnet.ibm.com> References: <1529484440-20634-1-git-send-email-byungchul.park@lge.com> <20180620145058.GP3593@linux.vnet.ibm.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 20 Jun 2018 07:50:58 -0700 "Paul E. McKenney" wrote: > On Wed, Jun 20, 2018 at 05:47:19PM +0900, Byungchul Park wrote: > > Get rid of dependency on ->dynticks_nmi_nesting. > > > > Signed-off-by: Byungchul Park > > --- > > kernel/rcu/tree.c | 22 ++++++++++------------ > > 1 file changed, 10 insertions(+), 12 deletions(-) > > > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > > index deb2508..59ae94e 100644 > > --- a/kernel/rcu/tree.c > > +++ b/kernel/rcu/tree.c > > @@ -797,6 +797,11 @@ void rcu_nmi_exit(void) > > return; > > } > > > > + if (!in_nmi()) { > > Is in_nmi() sufficiently reliable for use here? In the past, there have > been tracepoints that invoked these functions between the time that the > handlers were entered and the time that software updated the state so that > the various handler-check functions (such as in_nmi()) would return true. > > Steve, has there been any change in this situation? > There shouldn't be any "trace events", but what we had to deal with was function tracing. And in the near future, we will be getting "function based events" that will allow you to create an event in any function. That said, even the function tracer shouldn't be called from the time the NMI triggers to "in_nmi()" is set. Because there's some function tracer callbacks that should not be executed from an NMI, and I use in_nmi() to determine if they get called or not. -- Steve