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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77688C43217 for ; Thu, 30 Sep 2021 13:22:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5FCE561139 for ; Thu, 30 Sep 2021 13:22:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351299AbhI3NYa (ORCPT ); Thu, 30 Sep 2021 09:24:30 -0400 Received: from foss.arm.com ([217.140.110.172]:54128 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348651AbhI3NY3 (ORCPT ); Thu, 30 Sep 2021 09:24:29 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3BC08D6E; Thu, 30 Sep 2021 06:22:46 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.196.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 414EA3F793; Thu, 30 Sep 2021 06:22:43 -0700 (PDT) From: Valentin Schneider To: Frederic Weisbecker Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rcu@vger.kernel.org, linux-rt-users@vger.kernel.org, Catalin Marinas , Will Deacon , Ingo Molnar , Peter Zijlstra , Steven Rostedt , Daniel Bristot de Oliveira , Sebastian Andrzej Siewior , "Paul E. McKenney" , Josh Triplett , Mathieu Desnoyers , Davidlohr Bueso , Lai Jiangshan , Joel Fernandes , Anshuman Khandual , Vincenzo Frascino , Steven Price , Ard Biesheuvel , Boqun Feng , Mike Galbraith Subject: Re: rcu/tree: Protect rcu_rdp_is_offloaded() invocations on RT In-Reply-To: <20210930105340.GA232241@lothringen> References: <20210811201354.1976839-1-valentin.schneider@arm.com> <20210811201354.1976839-4-valentin.schneider@arm.com> <874kae6n3g.ffs@tglx> <87pmt163al.ffs@tglx> <87h7e21lqg.mognet@arm.com> <20210930105340.GA232241@lothringen> Date: Thu, 30 Sep 2021 14:22:36 +0100 Message-ID: <87ee9619lv.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/09/21 12:53, Frederic Weisbecker wrote: > On Thu, Sep 30, 2021 at 10:00:39AM +0100, Valentin Schneider wrote: >> My reasoning for adding protection in the outer functions was to prevent >> impaired unlocks of rcu_nocb_{un}lock_irqsave(), as that too depends on the >> offload state. Cf. Frederic's writeup: >> >> http://lore.kernel.org/r/20210727230814.GC283787@lothringen > > I was wrong about that BTW! > Because rcu_nocb_lock() always require IRQs to be disabled, which of course disables > preemption, so the offloaded state can't change between > rcu_nocb_lock[_irqsave]() and rcu_nocb_unlock[_irqrestore]() but anyway there > were many other issues to fix :-) > Ooooh... Even with you pointing it out, it took me a while to see it that way. It's tough to get out of holidays mode :-) 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FF2BC433EF for ; Thu, 30 Sep 2021 13:30:02 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5638161555 for ; Thu, 30 Sep 2021 13:30:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5638161555 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AQ7b0RhjdMHhSKYtKGNSPAcuhaYEIVN9+NSmOxFIiow=; b=FeU29jcrxxsT5D zEnTWPVri9AE+bhgKKplLTMFq+p74co9M35QSKZEDUKziiI/QQg0XSu8xjneGLiZlW8eb841jHVIs Im4xqmS78HNf1dosFrFt2AxphbMVVuyS8j2SSRl2ilBoLGlduJ53rkAFL2BfTyE1YjsfBVqgZ/uKl I0jx0EzyT3+N73lX6pzEdecmaiUbpeqwHeGTv75PqsaFO59aWNvEc+Sky1niGDAQcTl+7dUDLdHBI acnpx7RHHXKpoa+2PjFIwH9bV5QZHVVXfONLmUmMHrdO1Lp6Fn0XQiREeQjFvashnR9mcDYL0eiXj i8Ft4ESKCDm7ieSTIbRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVw4v-00ESnE-Fc; Thu, 30 Sep 2021 13:26:27 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVw1Q-00ERRF-34 for linux-arm-kernel@lists.infradead.org; Thu, 30 Sep 2021 13:22:49 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3BC08D6E; Thu, 30 Sep 2021 06:22:46 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.196.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 414EA3F793; Thu, 30 Sep 2021 06:22:43 -0700 (PDT) From: Valentin Schneider To: Frederic Weisbecker Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rcu@vger.kernel.org, linux-rt-users@vger.kernel.org, Catalin Marinas , Will Deacon , Ingo Molnar , Peter Zijlstra , Steven Rostedt , Daniel Bristot de Oliveira , Sebastian Andrzej Siewior , "Paul E. McKenney" , Josh Triplett , Mathieu Desnoyers , Davidlohr Bueso , Lai Jiangshan , Joel Fernandes , Anshuman Khandual , Vincenzo Frascino , Steven Price , Ard Biesheuvel , Boqun Feng , Mike Galbraith Subject: Re: rcu/tree: Protect rcu_rdp_is_offloaded() invocations on RT In-Reply-To: <20210930105340.GA232241@lothringen> References: <20210811201354.1976839-1-valentin.schneider@arm.com> <20210811201354.1976839-4-valentin.schneider@arm.com> <874kae6n3g.ffs@tglx> <87pmt163al.ffs@tglx> <87h7e21lqg.mognet@arm.com> <20210930105340.GA232241@lothringen> Date: Thu, 30 Sep 2021 14:22:36 +0100 Message-ID: <87ee9619lv.mognet@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210930_062248_199886_C087F299 X-CRM114-Status: GOOD ( 11.41 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 30/09/21 12:53, Frederic Weisbecker wrote: > On Thu, Sep 30, 2021 at 10:00:39AM +0100, Valentin Schneider wrote: >> My reasoning for adding protection in the outer functions was to prevent >> impaired unlocks of rcu_nocb_{un}lock_irqsave(), as that too depends on the >> offload state. Cf. Frederic's writeup: >> >> http://lore.kernel.org/r/20210727230814.GC283787@lothringen > > I was wrong about that BTW! > Because rcu_nocb_lock() always require IRQs to be disabled, which of course disables > preemption, so the offloaded state can't change between > rcu_nocb_lock[_irqsave]() and rcu_nocb_unlock[_irqrestore]() but anyway there > were many other issues to fix :-) > Ooooh... Even with you pointing it out, it took me a while to see it that way. It's tough to get out of holidays mode :-) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel