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 12322EB64DD for ; Sat, 22 Jul 2023 01:22:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229579AbjGVBWk (ORCPT ); Fri, 21 Jul 2023 21:22:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbjGVBWj (ORCPT ); Fri, 21 Jul 2023 21:22:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 807972D7E; Fri, 21 Jul 2023 18:22:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 081C861DA6; Sat, 22 Jul 2023 01:22:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A5AEC433C7; Sat, 22 Jul 2023 01:22:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689988957; bh=ymdnVGyJNnGUv2HZI8/M1PK0lCyu640ix4SSxWqfV44=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qX6KSrLjUNhNPi02nh+6ca0mclsiX8ngx6MgAoXToVEXfxGVJDqDd+M/xrQSvGPdo HnjJABDZ+OFRbofb+JDvnjIEveDSuko/ikgRmWfqsjkq952i36BAMvINTGaChjawkN B6OgwD+8AJO8pd8z/xs4a/6K9P/a/2QBnvpuWam+MrqHhLdmuXK4SwdOcmYgpxe7vM 22q4vDY9qAL+C5nUG3OBKyhHxxOwDvkPnHotsHGxEf6IGBGHRf44LFpW0ECov/5dH/ YZurOS/9kOxHoWBIWBcbE7057VWjExGXUHZp3YSqZogBmtq6DHFSz4dzR5vmf0EeHL 9OCfZ4ADrf3gQ== Date: Fri, 21 Jul 2023 18:22:35 -0700 From: Jakub Kicinski To: Steven Rostedt Cc: Alexander Lobakin , Peter Zijlstra , LKML , Ingo Molnar , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , "Benjamin Herrenschmidt" , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Thomas Gleixner , Borislav Petkov , , "H. Peter Anvin" , Josh Poimboeuf , "Jiri Kosina" , Miroslav Benes , Petr Mladek , Joe Lawrence , Colin Ian King , Masami Hiramatsu , "Nicholas Piggin" , Jisheng Zhang , , , , , , =?UTF-8?B?546L6LSH?= , Guo Ren Subject: Re: [PATCH] tracing: Have all levels of checks prevent recursion Message-ID: <20230721182235.6617a466@kernel.org> In-Reply-To: <20230721122632.56b4df6c@gandalf.local.home> References: <20211015110035.14813389@gandalf.local.home> <20211015161702.GF174703@worktop.programming.kicks-ass.net> <20211015133504.6c0a9fcc@gandalf.local.home> <20211015135806.72d1af23@gandalf.local.home> <20211015180429.GK174703@worktop.programming.kicks-ass.net> <20211015142033.72605b47@gandalf.local.home> <20211015142541.4badd8a9@gandalf.local.home> <1b402c0c-1beb-d93f-ff6d-955350995ca3@intel.com> <20230721120040.6ed2c02a@gandalf.local.home> <035cee53-255b-11a3-d7ac-ca46c05b907b@intel.com> <20230721122632.56b4df6c@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-csky@vger.kernel.org On Fri, 21 Jul 2023 12:26:32 -0400 Steven Rostedt wrote: > > if (!(in_hardirq() || irqs_disabled())) > > > > Yeah, probably. > > > , nothing more elegant / already existing / ...? > > It's not a common check. What would you call that? Looks like Olek started the weekend already so let me answer. He's trying to check if we can use a fast path cache which takes a _bh spin lock. 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 70220EB64DD for ; Sat, 22 Jul 2023 01:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=71Ho8K1ex7m2tCxdCVi+ey2P2SxLc4qgJlFUIj3/xuw=; b=1a6sgbUclEIWFG 0Vea4ddeAsDAhmt7nj0o4THytJWWJD1IuKhZyDav5LCQI6pJKnoQAgXRvBXPQi3tBrT7zi3eXZSwz LRbFtBMpjzz0JrnhKQn3NS1v4YhxBqHNvOAr5217c6UXJIvTB4h9IqFgDSwsxQfCduK7UqXRajtID 8M4nY7WGuL4tIojPC9mCHd+lCoPRcXIHXGkEhkG3c/N+lOGLvyc+9NUp3t99qm0NdVRVlvSSbITdH 7SclVbIDe08npMxt54sEPrl56P2uV58/Y/qvwyN288C/fWLc7eOQwa0I+B0aPApNlalzDaeyWsXMD 6sUqm/oct0huUc8KcSYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qN1KU-00FWnD-0z; Sat, 22 Jul 2023 01:22:42 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qN1KR-00FWmK-1p for linux-riscv@lists.infradead.org; Sat, 22 Jul 2023 01:22:40 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0344D61DB8; Sat, 22 Jul 2023 01:22:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A5AEC433C7; Sat, 22 Jul 2023 01:22:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689988957; bh=ymdnVGyJNnGUv2HZI8/M1PK0lCyu640ix4SSxWqfV44=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qX6KSrLjUNhNPi02nh+6ca0mclsiX8ngx6MgAoXToVEXfxGVJDqDd+M/xrQSvGPdo HnjJABDZ+OFRbofb+JDvnjIEveDSuko/ikgRmWfqsjkq952i36BAMvINTGaChjawkN B6OgwD+8AJO8pd8z/xs4a/6K9P/a/2QBnvpuWam+MrqHhLdmuXK4SwdOcmYgpxe7vM 22q4vDY9qAL+C5nUG3OBKyhHxxOwDvkPnHotsHGxEf6IGBGHRf44LFpW0ECov/5dH/ YZurOS/9kOxHoWBIWBcbE7057VWjExGXUHZp3YSqZogBmtq6DHFSz4dzR5vmf0EeHL 9OCfZ4ADrf3gQ== Date: Fri, 21 Jul 2023 18:22:35 -0700 From: Jakub Kicinski To: Steven Rostedt Cc: Alexander Lobakin , Peter Zijlstra , LKML , Ingo Molnar , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , "Benjamin Herrenschmidt" , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Thomas Gleixner , Borislav Petkov , , "H. Peter Anvin" , Josh Poimboeuf , "Jiri Kosina" , Miroslav Benes , Petr Mladek , Joe Lawrence , Colin Ian King , Masami Hiramatsu , "Nicholas Piggin" , Jisheng Zhang , , , , , , =?UTF-8?B?546L6LSH?= , Guo Ren Subject: Re: [PATCH] tracing: Have all levels of checks prevent recursion Message-ID: <20230721182235.6617a466@kernel.org> In-Reply-To: <20230721122632.56b4df6c@gandalf.local.home> References: <20211015110035.14813389@gandalf.local.home> <20211015161702.GF174703@worktop.programming.kicks-ass.net> <20211015133504.6c0a9fcc@gandalf.local.home> <20211015135806.72d1af23@gandalf.local.home> <20211015180429.GK174703@worktop.programming.kicks-ass.net> <20211015142033.72605b47@gandalf.local.home> <20211015142541.4badd8a9@gandalf.local.home> <1b402c0c-1beb-d93f-ff6d-955350995ca3@intel.com> <20230721120040.6ed2c02a@gandalf.local.home> <035cee53-255b-11a3-d7ac-ca46c05b907b@intel.com> <20230721122632.56b4df6c@gandalf.local.home> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230721_182239_651658_60C4CA6F X-CRM114-Status: UNSURE ( 8.41 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Fri, 21 Jul 2023 12:26:32 -0400 Steven Rostedt wrote: > > if (!(in_hardirq() || irqs_disabled())) > > > > Yeah, probably. > > > , nothing more elegant / already existing / ...? > > It's not a common check. What would you call that? Looks like Olek started the weekend already so let me answer. He's trying to check if we can use a fast path cache which takes a _bh spin lock. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 00143EB64DD for ; Sat, 22 Jul 2023 01:23:35 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=qX6KSrLj; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4R77wk1jcxz2yVX for ; Sat, 22 Jul 2023 11:23:34 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=qX6KSrLj; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=kuba@kernel.org; receiver=lists.ozlabs.org) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4R77vh6T8kz3bt5 for ; Sat, 22 Jul 2023 11:22:40 +1000 (AEST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0344D61DB8; Sat, 22 Jul 2023 01:22:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A5AEC433C7; Sat, 22 Jul 2023 01:22:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689988957; bh=ymdnVGyJNnGUv2HZI8/M1PK0lCyu640ix4SSxWqfV44=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qX6KSrLjUNhNPi02nh+6ca0mclsiX8ngx6MgAoXToVEXfxGVJDqDd+M/xrQSvGPdo HnjJABDZ+OFRbofb+JDvnjIEveDSuko/ikgRmWfqsjkq952i36BAMvINTGaChjawkN B6OgwD+8AJO8pd8z/xs4a/6K9P/a/2QBnvpuWam+MrqHhLdmuXK4SwdOcmYgpxe7vM 22q4vDY9qAL+C5nUG3OBKyhHxxOwDvkPnHotsHGxEf6IGBGHRf44LFpW0ECov/5dH/ YZurOS/9kOxHoWBIWBcbE7057VWjExGXUHZp3YSqZogBmtq6DHFSz4dzR5vmf0EeHL 9OCfZ4ADrf3gQ== Date: Fri, 21 Jul 2023 18:22:35 -0700 From: Jakub Kicinski To: Steven Rostedt Subject: Re: [PATCH] tracing: Have all levels of checks prevent recursion Message-ID: <20230721182235.6617a466@kernel.org> In-Reply-To: <20230721122632.56b4df6c@gandalf.local.home> References: <20211015110035.14813389@gandalf.local.home> <20211015161702.GF174703@worktop.programming.kicks-ass.net> <20211015133504.6c0a9fcc@gandalf.local.home> <20211015135806.72d1af23@gandalf.local.home> <20211015180429.GK174703@worktop.programming.kicks-ass.net> <20211015142033.72605b47@gandalf.local.home> <20211015142541.4badd8a9@gandalf.local.home> <1b402c0c-1beb-d93f-ff6d-955350995ca3@intel.com> <20230721120040.6ed2c02a@gandalf.local.home> <035cee53-255b-11a3-d7ac-ca46c05b907b@intel.com> <20230721122632.56b4df6c@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?B?546L6LSH?= , Peter Zijlstra , Paul Walmsley , "James E.J. Bottomley" , Paul Mackerras , Jisheng Zhang , "H. Peter Anvin" , live-patching@vger.kernel.org, linux-riscv@lists.infradead.org, Miroslav Benes , Joe Lawrence , Helge Deller , x86@kernel.org, linux-csky@vger.kernel.org, Ingo Molnar , Petr Mladek , Albert Ou , Jiri Kosina , Nicholas Piggin , Borislav Petkov , Josh Poimboeuf , Thomas Gleixner , linux-parisc@vger.kernel.org, LKML , Alexander Lobakin , Palmer Dabbelt , Masami Hiramatsu , Guo Ren , Colin Ian King , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, 21 Jul 2023 12:26:32 -0400 Steven Rostedt wrote: > > if (!(in_hardirq() || irqs_disabled())) > > > > Yeah, probably. > > > , nothing more elegant / already existing / ...? > > It's not a common check. What would you call that? Looks like Olek started the weekend already so let me answer. He's trying to check if we can use a fast path cache which takes a _bh spin lock.