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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44436C32771 for ; Wed, 21 Sep 2022 22:05:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230431AbiIUWFp (ORCPT ); Wed, 21 Sep 2022 18:05:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230246AbiIUWFn (ORCPT ); Wed, 21 Sep 2022 18:05:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD5D39E69C for ; Wed, 21 Sep 2022 15:05:41 -0700 (PDT) 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 5950362DC1 for ; Wed, 21 Sep 2022 22:05:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0702C433C1; Wed, 21 Sep 2022 22:05:39 +0000 (UTC) Date: Wed, 21 Sep 2022 18:06:40 -0400 From: Steven Rostedt To: Waiman Long Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] locking: Provide a low overhead do_arch_spin_lock() API Message-ID: <20220921180640.032d16fd@gandalf.local.home> In-Reply-To: <20220921132152.1622616-2-longman@redhat.com> References: <20220921132152.1622616-1-longman@redhat.com> <20220921132152.1622616-2-longman@redhat.com> 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Sep 2022 09:21:51 -0400 Waiman Long wrote: > There are some code paths in the kernel like tracing or rcu where they > want to use a spinlock without the lock debugging overhead (lockdep, > etc). Provide a do_arch_spin_lock() API with proper preemption disabling > and enabling without any debugging or tracing overhead. > > Signed-off-by: Waiman Long Please don't do this. arch_spin_lock() is very special, and if tracing did it wrong, then it needs to be fixed in the tracing code. Let's not add handlers to make it easier to use arch_spin_lock(). Tracing is special and arch_spin_lock() helps keep it from tracing itself. -- Steve