Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp656842rdf; Tue, 21 Nov 2023 12:32:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWtCBa/s0z7qKqI/7L9JPjlZRLjR5fOBg3KEWdjRlFRf8eONqvqIjXTpQzPBfV59No+Hh3 X-Received: by 2002:a05:6a21:1f30:b0:18a:e0de:dd51 with SMTP id ry48-20020a056a211f3000b0018ae0dedd51mr173222pzb.26.1700598757229; Tue, 21 Nov 2023 12:32:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700598757; cv=none; d=google.com; s=arc-20160816; b=AD9xJaRzlKQ6WPxbov0DG87vgQdql/1ZFcfjBIBxToG4oxc3yYCxScIEI58rzIlIN2 Wv8J7UERcaOnAg3gmqsNynXbCAaebnRXu7HSx+N6ktyL76DPBxOSVvJDQ1m73pCBbpPA yrlJJKmDP0O7nmrk/9hlQBd8Nty3PyBf58CxbUsJC7bZNYUDaPWYoV6RCoTjI69G+yG7 +3SWndQjUEAXxU3QESDYHHrwT/we8Ko74NUQ2FCqh9DCRjNeh5svt/WHZGM0vwSr9JXb yYG2XVEYxUqhk8h6BJLNWvS1jxFd2ge3hSEbwzWfKjE3JDk7PJrTXDuLs61N5jhSv4pU N9Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mPcvVUr8HyRnp1aSDsAdvlimBvK+3BhX+aM2Alx5mqo=; fh=XWKjFiBXW4hmsH4n8NhdQupVHf0a/f9pd/XN26tqu+g=; b=CoJogzPpaIFWSeYvCYdDfkBCPviuMekT2F0Phplta17mL1KCrOH0RvRx2zjnRLgkOV YezrvfKzjMsazjlSPvV76JAhTutT1v5pFtmUiM13XndcbJCe5FWdbf9LMZMKkFe1hH5F rOsu+KI+A4cIcK1ce8gtgq2nmIE1/kG6ALbQ9WgztuunX6Q+s8NaVNRhv+DeXGrGY/Wi IE6Vnev2DqjA0ChzioL7weBknn4jEj1UNT/CjpRjzsMhYU2pkUsoyedE/uAS1NKGu7So odp9Koos3ePbuzqE/KPZHKpGTyOqNQ0pm5VBFJQXC/7181I2wy8CpUP46BOXxCOY6g6n HHgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=mIrgR5qR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id fh14-20020a056a00390e00b00690dbd360basi11270019pfb.152.2023.11.21.12.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 12:32:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=mIrgR5qR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 5C31B8076666; Tue, 21 Nov 2023 12:32:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234244AbjKUUcQ (ORCPT + 99 others); Tue, 21 Nov 2023 15:32:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234384AbjKUUcO (ORCPT ); Tue, 21 Nov 2023 15:32:14 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 406C51AA for ; Tue, 21 Nov 2023 12:32:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mPcvVUr8HyRnp1aSDsAdvlimBvK+3BhX+aM2Alx5mqo=; b=mIrgR5qRdk0w3cvo6OGhGx+ybS ryPeZ+PXcYXTJUMdDd/bThNofQWboBYTG35XeXgxcoX08VW9Y9LgXs63MCtsCGudARZThuf+Hj1u5 ppZwOEc1du3571f7wiXafXNASbPLpf2QbZujF7DZ/3QjXwTcbBawhMW3DYDjkeJhxBkhaJ3CeNpKx tgDBWcScPDaxolJgzIpoeMZS6rJos5gjndFbrMrMsnFQ2tnR5/cXrJMl3g1fRSI2WNBtr4yRBCQmQ jHYZKGwZitUA6jlmR89mKmUfU4DJ4hLPRn8dqQnX3OyTSAv9G63vxXH1XVcf4s7BbGTpH9Mf5Si/2 LN2ub+Bg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1r5XOV-00BYNi-0M; Tue, 21 Nov 2023 20:30:52 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id D95D0300338; Tue, 21 Nov 2023 21:30:49 +0100 (CET) Date: Tue, 21 Nov 2023 21:30:49 +0100 From: Peter Zijlstra To: "Paul E. McKenney" Cc: Ankur Arora , linux-kernel@vger.kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@aculab.com, richard@nod.at, mjguzik@gmail.com Subject: Re: [RFC PATCH 48/86] rcu: handle quiescent states for PREEMPT_RCU=n Message-ID: <20231121203049.GN8262@noisy.programming.kicks-ass.net> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107215742.363031-49-ankur.a.arora@oracle.com> <2027da00-273d-41cf-b9e7-460776181083@paulmck-laptop> <87lear4wj6.fsf@oracle.com> <46a4c47a-ba1c-4776-a6f8-6c2146cbdd0d@paulmck-laptop> <31d50051-e42c-4ef2-a1ac-e45370c3752e@paulmck-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 12:32:34 -0800 (PST) On Tue, Nov 21, 2023 at 11:25:18AM -0800, Paul E. McKenney wrote: > #define preempt_enable() \ > do { \ > barrier(); \ > if (!IS_ENABLED(CONFIG_PREEMPT_RCU) && raw_cpu_read(rcu_data.rcu_urgent_qs) && \ > (preempt_count() & (PREEMPT_MASK | SOFTIRQ_MASK | HARDIRQ_MASK | NMI_MASK) == PREEMPT_OFFSET) && > !irqs_disabled()) \ > rcu_all_qs(); \ > if (unlikely(preempt_count_dec_and_test())) { \ > __preempt_schedule(); \ > } \ > } while (0) Aaaaahhh, please no. We spend so much time reducing preempt_enable() to the minimal thing it is today, this will make it blow up into something giant again.