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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 362EFC4338F for ; Fri, 20 Aug 2021 07:11:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E62360ED5 for ; Fri, 20 Aug 2021 07:11:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238721AbhHTHLz (ORCPT ); Fri, 20 Aug 2021 03:11:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238617AbhHTHLt (ORCPT ); Fri, 20 Aug 2021 03:11:49 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3B25C061575; Fri, 20 Aug 2021 00:11:11 -0700 (PDT) Date: Fri, 20 Aug 2021 09:11:06 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1629443468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BhJm6h/KmQ36SxJO/2gjBAj+dUs+SDXHn2zO3h495m8=; b=K2TeM8EuBM8nBOJY3cK0mmmmngi+gUFpDslflP36mdX8vF6pgoqRG+miwU8gOMGdLaUNIb opDcaK7OjKRkcfOTYZUvPYUdwlHdD15sI5R6wjVNm+VX16jtbv+5eg/lwZOjMNb1+d3fvH eLD3i5EskK5qKYvPvVN7J4+vHVVQFSZEF5U5qTN8SC7edfqLiPTZq5ozo6r5msRDeSWhqI VHpB12g7EozTrZjbS6O58orAj2lIGLTQs+vElHJLgifE1RAwdI6J1sQf7arJW5HYKwANSP y6c6SdiQr9yqjQH3DvndDUc1vP6qqbhnhSnIcnJIrUxJ1UG5gKlqWte9f9CVAw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1629443468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BhJm6h/KmQ36SxJO/2gjBAj+dUs+SDXHn2zO3h495m8=; b=r213p/vK5C55sdc8OCgcBJE1Gu+stAuR47QxNcv6JNxCqBeemj3Z7vx80HSwMGTE4bwi1N gZ7Zf7SseYDAQKBA== From: Sebastian Andrzej Siewior To: Scott Wood Cc: paulmck@kernel.org, Valentin Schneider , 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 , Thomas Gleixner , Steven Rostedt , Daniel Bristot de Oliveira , Frederic Weisbecker , Josh Triplett , Mathieu Desnoyers , Davidlohr Bueso , Lai Jiangshan , Joel Fernandes , Anshuman Khandual , Vincenzo Frascino , Steven Price , Ard Biesheuvel , Boqun Feng , Mike Galbraith Subject: Re: [PATCH] rcutorture: Avoid problematic critical section nesting on RT Message-ID: <20210820071106.fba7l6ikgo7aa6xm@linutronix.de> References: <20210811201354.1976839-1-valentin.schneider@arm.com> <20210811201354.1976839-2-valentin.schneider@arm.com> <20210817121345.5iyj5epemczn3a52@linutronix.de> <20210817131741.evduh4fw7vyv2dzt@linutronix.de> <20210817144018.nqssoq475vitrqlv@linutronix.de> <20210818224651.GY4126399@paulmck-ThinkPad-P17-Gen-1> <20210819153927.clqxr4f7qegpflbr@linutronix.de> <20210819154708.3efz6jtgwtuhpeds@linutronix.de> <20210819182035.GF4126399@paulmck-ThinkPad-P17-Gen-1> <561ab28b18c31fbc221f4cb0c4df6db9b0538675.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <561ab28b18c31fbc221f4cb0c4df6db9b0538675.camel@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-08-19 23:11:12 [-0500], Scott Wood wrote: > On Thu, 2021-08-19 at 11:20 -0700, Paul E. McKenney wrote: > > On Thu, Aug 19, 2021 at 05:47:08PM +0200, Sebastian Andrzej Siewior wrote: > > > On 2021-08-19 17:39:29 [+0200], To Paul E. McKenney wrote: > > > > + /* > > > > + * Ideally these sequences would be detected in debug builds > > > > + * (regardless of RT), but until then don't stop testing > > > > + * them on non-RT. > > > > + */ > > > > + if (IS_ENABLED(CONFIG_PREEMPT_RT)) { > > > > + /* > > > > + * Can't release the outermost rcu lock in an irq disabled > > > > + * section without preemption also being disabled, if irqs > > > > + * had ever been enabled during this RCU critical section > > > > + * (could leak a special flag and delay reporting the qs). > > > > + */ > > > > + if ((oldmask & RCUTORTURE_RDR_RCU) && > > > > + (mask & RCUTORTURE_RDR_IRQ) && > > > > + !(mask & preempts)) > > > > + mask |= RCUTORTURE_RDR_RCU; > > > > > > This piece above, I don't understand. I had it running for a while and > > > it didn't explode. Let me try TREE01 for 30min without that piece. > > > > This might be historical. There was a time when interrupts being > > disabled across rcu_read_unlock() meant that preemption had to have > > been disabled across the entire RCU read-side critical section. > > > > I am not seeing a purpose for it now, but I could easily be missing > > something, especially given my tenuous grasp of RT. > > Yeah, I think this was to deal with not having the irq work stuff in RT > at the time. Good. Thank you for the confirmation. I run (without the hunk above) 2x 6h of TREE01 and 4x 6h of TREE06 and it looked good. > -Scott Sebastian 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 X-Spam-Level: X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7297C4338F for ; Fri, 20 Aug 2021 07:12:59 +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 91B4F61042 for ; Fri, 20 Aug 2021 07:12:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 91B4F61042 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de 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:In-Reply-To:MIME-Version:References: 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=ARSVDAmZmzIsA4Htd6PwsfKdCmp55GowqU9CxYduk4A=; b=EJ3R+VSwJHyD6Y H5L5ewqn+aPzwvucFYZ81y34NchphNs/sNwSIi5hivOzhzGwlPn9R2aHwLCA/C3vtUWyNcOu3HwEW L+mFCuOUl53bk03BAv5hN2uPKs8ysq4K667G1KqFj17vwOwCe/wfJOPOfKqfNnbFgRaquRGukJGI9 DuKUs5zjPBBffNBbkOWSyIRevt7yGrzP9GUVFkfps30fRRx/peAEVKMGNa1tCT2zdfd8pH4ChKsUF qwQmHweYn5vXU2GkP4Q6ePFSlPgN98fED+yJqvLmgSJ60MnRZXFV0ayEdwfjqSviKXueinajsNHE8 eebGjclPOWwja3M1rjSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mGygP-00AEhO-83; Fri, 20 Aug 2021 07:11:17 +0000 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mGygI-00AEfl-46 for linux-arm-kernel@lists.infradead.org; Fri, 20 Aug 2021 07:11:14 +0000 Date: Fri, 20 Aug 2021 09:11:06 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1629443468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BhJm6h/KmQ36SxJO/2gjBAj+dUs+SDXHn2zO3h495m8=; b=K2TeM8EuBM8nBOJY3cK0mmmmngi+gUFpDslflP36mdX8vF6pgoqRG+miwU8gOMGdLaUNIb opDcaK7OjKRkcfOTYZUvPYUdwlHdD15sI5R6wjVNm+VX16jtbv+5eg/lwZOjMNb1+d3fvH eLD3i5EskK5qKYvPvVN7J4+vHVVQFSZEF5U5qTN8SC7edfqLiPTZq5ozo6r5msRDeSWhqI VHpB12g7EozTrZjbS6O58orAj2lIGLTQs+vElHJLgifE1RAwdI6J1sQf7arJW5HYKwANSP y6c6SdiQr9yqjQH3DvndDUc1vP6qqbhnhSnIcnJIrUxJ1UG5gKlqWte9f9CVAw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1629443468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BhJm6h/KmQ36SxJO/2gjBAj+dUs+SDXHn2zO3h495m8=; b=r213p/vK5C55sdc8OCgcBJE1Gu+stAuR47QxNcv6JNxCqBeemj3Z7vx80HSwMGTE4bwi1N gZ7Zf7SseYDAQKBA== From: Sebastian Andrzej Siewior To: Scott Wood Cc: paulmck@kernel.org, Valentin Schneider , 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 , Thomas Gleixner , Steven Rostedt , Daniel Bristot de Oliveira , Frederic Weisbecker , Josh Triplett , Mathieu Desnoyers , Davidlohr Bueso , Lai Jiangshan , Joel Fernandes , Anshuman Khandual , Vincenzo Frascino , Steven Price , Ard Biesheuvel , Boqun Feng , Mike Galbraith Subject: Re: [PATCH] rcutorture: Avoid problematic critical section nesting on RT Message-ID: <20210820071106.fba7l6ikgo7aa6xm@linutronix.de> References: <20210811201354.1976839-1-valentin.schneider@arm.com> <20210811201354.1976839-2-valentin.schneider@arm.com> <20210817121345.5iyj5epemczn3a52@linutronix.de> <20210817131741.evduh4fw7vyv2dzt@linutronix.de> <20210817144018.nqssoq475vitrqlv@linutronix.de> <20210818224651.GY4126399@paulmck-ThinkPad-P17-Gen-1> <20210819153927.clqxr4f7qegpflbr@linutronix.de> <20210819154708.3efz6jtgwtuhpeds@linutronix.de> <20210819182035.GF4126399@paulmck-ThinkPad-P17-Gen-1> <561ab28b18c31fbc221f4cb0c4df6db9b0538675.camel@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <561ab28b18c31fbc221f4cb0c4df6db9b0538675.camel@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210820_001110_358596_4B127058 X-CRM114-Status: GOOD ( 23.24 ) 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 2021-08-19 23:11:12 [-0500], Scott Wood wrote: > On Thu, 2021-08-19 at 11:20 -0700, Paul E. McKenney wrote: > > On Thu, Aug 19, 2021 at 05:47:08PM +0200, Sebastian Andrzej Siewior wrote: > > > On 2021-08-19 17:39:29 [+0200], To Paul E. McKenney wrote: > > > > + /* > > > > + * Ideally these sequences would be detected in debug builds > > > > + * (regardless of RT), but until then don't stop testing > > > > + * them on non-RT. > > > > + */ > > > > + if (IS_ENABLED(CONFIG_PREEMPT_RT)) { > > > > + /* > > > > + * Can't release the outermost rcu lock in an irq disabled > > > > + * section without preemption also being disabled, if irqs > > > > + * had ever been enabled during this RCU critical section > > > > + * (could leak a special flag and delay reporting the qs). > > > > + */ > > > > + if ((oldmask & RCUTORTURE_RDR_RCU) && > > > > + (mask & RCUTORTURE_RDR_IRQ) && > > > > + !(mask & preempts)) > > > > + mask |= RCUTORTURE_RDR_RCU; > > > > > > This piece above, I don't understand. I had it running for a while and > > > it didn't explode. Let me try TREE01 for 30min without that piece. > > > > This might be historical. There was a time when interrupts being > > disabled across rcu_read_unlock() meant that preemption had to have > > been disabled across the entire RCU read-side critical section. > > > > I am not seeing a purpose for it now, but I could easily be missing > > something, especially given my tenuous grasp of RT. > > Yeah, I think this was to deal with not having the irq work stuff in RT > at the time. Good. Thank you for the confirmation. I run (without the hunk above) 2x 6h of TREE01 and 4x 6h of TREE06 and it looked good. > -Scott Sebastian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel