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 1F558C433F5 for ; Wed, 9 Mar 2022 22:25:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236217AbiCIW0Z (ORCPT ); Wed, 9 Mar 2022 17:26:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229781AbiCIW0X (ORCPT ); Wed, 9 Mar 2022 17:26:23 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47C916A072 for ; Wed, 9 Mar 2022 14:25:24 -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 D53F361B43 for ; Wed, 9 Mar 2022 22:25:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBD1CC340E8; Wed, 9 Mar 2022 22:25:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646864723; bh=7VwSKftfAHbW2UAnTQ46IwVsEYq0prOKAeLb+si6kNU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V81NdOoJzpDUxoNjDJ7+Op10BjeNeHox6pNkrHv/BPn2itKlKTtJfAzfGudAl8Xeo RPOt+vO7MmzD3M1f/+LnAwHvJUqbNmfnve5GpQpYdoyO/A+N3JKeLzYpYHkX8OUSkP 927nd8SVTdQDk6yy/TF4bNH9eAzdb/4L7rlXZ1y1keLWA29WMy34D10Q5OEMI9OLW0 O0XlbZ/FwE4TpyX/576N0x2yNjoLcK3b03ayjjnmRMW9d0IqaD10Ylr1PslMQmCDNW 9rAtYKlU5ujrc7+r3JPXGPtmVw4g52q9SsQDjLiBeTvuid92PhYpJ3ZJY25F/KNhmz 4GgusRZrSDEmg== Date: Wed, 9 Mar 2022 23:25:20 +0100 From: Frederic Weisbecker To: Peter Zijlstra Cc: LKML , Phil Auld , Alex Belits , Nicolas Saenz Julienne , Xiongfeng Wang , Neeraj Upadhyay , Thomas Gleixner , Yu Liao , Boqun Feng , "Paul E . McKenney" , Marcelo Tosatti , Paul Gortmaker , Uladzislau Rezki , Joel Fernandes Subject: Re: [PATCH 09/19] rcu/context-tracking: Remove rcu_irq_enter/exit() Message-ID: <20220309222520.GF68899@lothringen> References: <20220302154810.42308-1-frederic@kernel.org> <20220302154810.42308-10-frederic@kernel.org> <20220305141603.GY11184@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220305141603.GY11184@worktop.programming.kicks-ass.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 05, 2022 at 03:16:03PM +0100, Peter Zijlstra wrote: > On Wed, Mar 02, 2022 at 04:48:00PM +0100, Frederic Weisbecker wrote: > > void ct_irq_enter_irqson(void) > > { > > - rcu_irq_enter_irqson(); > > + unsigned long flags; > > + > > + local_irq_save(flags); > > + ct_irq_enter(); > > + local_irq_restore(flags); > > } > > > > void ct_irq_exit_irqson(void) > > { > > - rcu_irq_exit_irqson(); > > + unsigned long flags; > > + > > + local_irq_save(flags); > > + ct_irq_exit(); > > + local_irq_restore(flags); > > } > > I know you're just copying code around, but this is broken per > construction :/ > > On the irq_enter site, local_irq_save() will hit a tracepoint, which > requires RCU, which will only be made available by the ct_irq_enter(). > Same in reverse for the exit case. Ouch. And playing a game similar to that in default_idle_call() is going to be trickier because rcu_irq_enter() may or may not exit an RCU-off mode. But it's feasible. Again I'll fix it ahead. Thanks!