Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4851550rwb; Sat, 10 Dec 2022 17:03:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf4BxDk0B8BMCeTWaYghbiJgrNAVrS0uDkBnrs3Hre23TQwEIXYUfHHPP0MMlJt/pPDQAb1M X-Received: by 2002:a17:902:7c16:b0:188:f04e:6a72 with SMTP id x22-20020a1709027c1600b00188f04e6a72mr10457822pll.52.1670720612661; Sat, 10 Dec 2022 17:03:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670720612; cv=none; d=google.com; s=arc-20160816; b=MTyJOeSxyff1fpV7FVC+2mYdiLhaUhX5+2ro5j3Zi+raUpVTRYbCZcI8JNCqC8IQDS 3UqDLIWz/p8ZGeLlqNky4/lXpjcvc2uC17ueNhmGZzlBFD0uBHXilwHaXHdAFzvDmuW0 Xtl93Jr4LxeXIhkfcOcRFWDBS6jVM0TfieKWq+OcxDvTcBc6bGxOzq6/8fcMPSMTxht0 EtdCHIb7dZjdobmhPWy6tQ3SwcvrBqALzPPwwmY2KqzEM56GQFTrRUO3GVFDfKKHYXmW PIkkVAf/WjJOsKp24QPC8ca4URr11RRUfDV0qWppM+AqwJwhYVRBcmV5NwmzGJv2FdXx DC9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=PyhJ/GU1cDDw+eDrd/JQkmJaSGGet03gAdfd2RGUMUA=; b=tmNfv8JAVg7e5zYhhUnm6NXRpNkQ0IHQmSE5RSrg78pbeFnVp68F5xhZzaenp47Icj s0Ee22MYza1+5jEKI66lpe0tDC/BD5mq4kYlniRfAXRqL2+TwpTzr0OVtMm+nLmeCPNB t5phWKh9codiJR+OrO8WPdn1QDloDIUJCIhUkm4zJ3IrKrY0QBtLUS4sBOAGyCb+mb3w kPswlcUSvCaz3XOLWhAJFu4oH7l6YsMjJYE95xb3gfqMnL2tWh3SNZRujC/aa+eiEMDP iZ/K2NvRGH0PH4o9VSwDXElpohhax1wFvx1so7+lRC7iELoXoBjlATPS3OAxGlQZ0Cf4 VM2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jb3-20020a170903258300b001842f55e713si5272551plb.321.2022.12.10.17.03.21; Sat, 10 Dec 2022 17:03:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229746AbiLJX4H (ORCPT + 77 others); Sat, 10 Dec 2022 18:56:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbiLJX4G (ORCPT ); Sat, 10 Dec 2022 18:56:06 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9D40CE19 for ; Sat, 10 Dec 2022 15:56:01 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4D79C60CEB for ; Sat, 10 Dec 2022 23:56:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51DCDC433D2; Sat, 10 Dec 2022 23:55:59 +0000 (UTC) Date: Sat, 10 Dec 2022 18:55:55 -0500 From: Steven Rostedt To: Thomas Gleixner Cc: "Paul E. McKenney" , linux-kernel@vger.kernel.org, Masami Hiramatsu , Andrew Morton , Karol Herbst , Pekka Paalanen , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Ingo Molnar , Borislav Petkov Subject: Re: [for-next][PATCH 13/25] x86/mm/kmmio: Use rcu_read_lock_sched_notrace() Message-ID: <20221210185555.7abc4de4@gandalf.local.home> In-Reply-To: <87359mdeg3.ffs@tglx> References: <20221210135750.425719934@goodmis.org> <20221210135825.241167123@goodmis.org> <20221210174753.GD4001@paulmck-ThinkPad-P17-Gen-1> <20221210133425.4657985e@gandalf.local.home> <87359mdeg3.ffs@tglx> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 11 Dec 2022 00:30:36 +0100 Thomas Gleixner wrote: > On Sat, Dec 10 2022 at 13:34, Steven Rostedt wrote: > > On Sat, 10 Dec 2022 09:47:53 -0800 "Paul E. McKenney" wrote: > >> This does mess with preempt_count() redundantly, but the overhead from > >> that should be way down in the noise. > > > > I was going to remove it, but then I realized that it would be a functional > > change, as from the comment above, it uses "preempt_enable_no_resched(), > > which there is not a rcu_read_unlock_sched() variant. > > preempt_enable_no_resched() in this context is simply garbage. > > preempt_enable_no_resched() tries to avoid the overhead of checking > whether rescheduling is due after decrementing preempt_count() because > the code which it this claims to know that it is _not_ the outermost one > which brings preempt count back to preemtible state. > > I concede that there are hot paths which actually can benefit, but this > code has exactly _ZERO_ benefit from that. Taking that tracing exception > and handling it is orders of magnitudes more expensive than a regular > preempt_enable(). > > So just get rid of it and don't proliferate cargo cult programming. > The point of the patch is to just fix the lockdep issue. I'm happy to remove that "no_resched" (I was planning to), but that would be a separate change, with a different purpose, and thus a separate patch. -- Steve