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=-6.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 4C5B2C4727C for ; Tue, 29 Sep 2020 14:53:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B8C5320757 for ; Tue, 29 Sep 2020 14:53:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="X7ULjOFE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731405AbgI2Ox1 (ORCPT ); Tue, 29 Sep 2020 10:53:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727328AbgI2Ox0 (ORCPT ); Tue, 29 Sep 2020 10:53:26 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC329C061755; Tue, 29 Sep 2020 07:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=7a3rid5iIIJ/qWOxgzz0xAKTGTBmmcrw4IkIb4Li8tM=; b=X7ULjOFEfMhygs0cAAFKwoUbfe QrG5N7Kc2U3BpZVT5FJ1yTq6eTIlCA9IijREqZr3c0IWBcSUmZVPOCbOEq0Ao0EIKNRvpriRzVGrF uzQSJyIPdgj1oAolKk15Y/NxtwSABCvGPuVwufOGvF/cQOaMm6J/wwVrqddJ9jO5todTEkBb2JcfB NL69gp4tOwEOJZGs1OZq7WT+Qi7ORRflp8NqFKgEbaY2sSj5rltPTfV09Xqsx44lxbF2tWddTWWeX htozEoPDRJf30TmOhA3RguREbipxKDSLBA55u3dtXj++42BpJ4ULmM3nln5JrG3hN0pHvwaFwbWLs 0EGLMRZw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNGzw-0007H5-Gs; Tue, 29 Sep 2020 14:52:56 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 93D57304B92; Tue, 29 Sep 2020 16:52:55 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4AF59210E84D1; Tue, 29 Sep 2020 16:52:55 +0200 (CEST) Date: Tue, 29 Sep 2020 16:52:55 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org, Thomas Gleixner , Alexandre Chartre , "Paul E. McKenney" , x86 Subject: Re: [tip: core/rcu] rcu/tree: Mark the idle relevant functions noinstr Message-ID: <20200929145255.GQ2628@hirez.programming.kicks-ass.net> References: <20200505134100.575356107@linutronix.de> <158991795300.17951.11897222265664137612.tip-bot2@tip-bot2> <20200929112541.GM2628@hirez.programming.kicks-ass.net> <20200929103454.03c29330@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200929103454.03c29330@gandalf.local.home> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 29, 2020 at 10:34:54AM -0400, Steven Rostedt wrote: > Anyway, you bring up a good point. I should have this: Acked-by: Peter Zijlstra (Intel) > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > index 84f32dbc7be8..2d76eaaad4a7 100644 > --- a/kernel/trace/ftrace.c > +++ b/kernel/trace/ftrace.c > @@ -6993,16 +6993,14 @@ static void ftrace_ops_assist_func(unsigned long ip, unsigned long parent_ip, > { > int bit; > > - if ((op->flags & FTRACE_OPS_FL_RCU) && !rcu_is_watching()) > - return; > - > bit = trace_test_and_set_recursion(TRACE_LIST_START, TRACE_LIST_MAX); > if (bit < 0) > return; > > preempt_disable_notrace(); > > - op->func(ip, parent_ip, op, regs); > + if (!(op->flags & FTRACE_OPS_FL_RCU) || rcu_is_watching()) > + op->func(ip, parent_ip, op, regs); > > preempt_enable_notrace(); > trace_clear_recursion(bit); > > > > -- Steve