Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1689267rdb; Thu, 7 Dec 2023 06:24:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IHbsfqtzO7SbmPmcwYn2jjqOglrKnfOjzNXgodA9QYUBvVyz6T8btPnM1ANG0DlGnGvQl/7 X-Received: by 2002:a17:902:c38c:b0:1cf:c376:6d7f with SMTP id g12-20020a170902c38c00b001cfc3766d7fmr2551914plg.42.1701959088758; Thu, 07 Dec 2023 06:24:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701959088; cv=none; d=google.com; s=arc-20160816; b=HhlSPheYzlgCjCH47cT21DrfUOfK8p9ArMu32nkMNM+59cON2fNPpz1usEN42Qexfr mWBin3BG1fsUGfDE2YUuMw5zo2JtgUz0hLjkFVw/75fZV/5nS0bWMUQEGhPZNFG1+3BL xZhsvKSoZ2JQvwttQtOzb0l7D1pQZpxkd5nwTOjZ7ErrJQ072OcJLsyuaHK7vj0d6M/g MqBdGcnnxBSNraBQ9jl0RjA/BsstHoHh6tdodsU4+XokUtzkEalte2GUBgSoM6nf6yo9 rnV4MbGUIPrlR4l6wZAT9t+EiiiU4Lu/xk2f0psUtYHSA+ErFmSgbQfF2VmrM+M96VaB Rs3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=5+meghr10Q4OSRh4RQyuEX2dDpm4A+Y90YMyl1NdRhU=; fh=DropjeUimz2hER8x8efX13kW/61yqMrdLJHzYrn5UaU=; b=Z6RjqHchcz+loJUn2W3yCmuwZhun3EYZtUDfUhxwAwrg1LlrfQqATBPlZQaWPIZ/LK Db6xeKOKyZ6V539MAM8VlcBF0WFttr1OPlA3AcOnaWj+VgdXIeC4Or6g09/umdx0n7o3 bSGX4dgdEiRj0zqM7VNg6ddtYuNjrWZz4goX92amUmqTXiIc9YgF7ao+sg5sWVQ607Ob QohPpIRm9yTEy+W/7uI5wkaLDLw/GdaBgsjlEHFQz7bH7bgs1uXMcgBaKf5chOO2dG4i IxlRJueflOL5HoVhKTgtGf5l+mAX7i/SBDutjrnLwMi/eRc1UEn3KkYkAh644LPUzATZ W2iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=LIwByYLR; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=X3kwmPof; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id n7-20020a170902d2c700b001cf5cb5ac88si1220207plc.486.2023.12.07.06.24.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:24:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=LIwByYLR; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=X3kwmPof; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 909C8803F971; Thu, 7 Dec 2023 06:24:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443325AbjLGOY3 (ORCPT + 99 others); Thu, 7 Dec 2023 09:24:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443217AbjLGOYJ (ORCPT ); Thu, 7 Dec 2023 09:24:09 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C217730CD for ; Thu, 7 Dec 2023 06:22:51 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1701958968; 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=5+meghr10Q4OSRh4RQyuEX2dDpm4A+Y90YMyl1NdRhU=; b=LIwByYLR+IKdR2U8iDshLjY1VnSSTv98bN5M/b7KlkEqe9nKvHrUML3xvobbzDKXXIemKk PV6LvSrTLwPPEVPPb8NjDqImj0cP9vH/C38qXipPwq2IKom66S06Mw4k0IWpfePGJoYB7h 05BgtphOFZea2/8Pxlk1drUTiGzczuxU53sUsKIjERPcSrdc7KxkVZoQ5oZ1/O6XjfWTK6 20ZCrKVGxFEM/jVYugxqijVPhv6qU/U4zE4ZubiOhFRdxTODyadHUmSDUmTa4FTW+NzB2Z J7jFjDOrby8PFumn9R9T3baFP1k5vsemmRRSr4MgNfXJ+fviJT3Rbi8gNMGHPg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1701958968; 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=5+meghr10Q4OSRh4RQyuEX2dDpm4A+Y90YMyl1NdRhU=; b=X3kwmPofSRkNcOuT2sHFcEzLxyYQttefkBTMoLoFW2xmRh0MbL3p6eOOyHS0leUqUtDx1M urgD2/ovNFmHegBg== To: Ankur Arora , paulmck@kernel.org Cc: Ankur Arora , linux-kernel@vger.kernel.org, peterz@infradead.org, 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 In-Reply-To: <87zfymn6h9.fsf@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107215742.363031-49-ankur.a.arora@oracle.com> <2027da00-273d-41cf-b9e7-460776181083@paulmck-laptop> <87v89lzu5a.ffs@tglx> <209f0e89-7ebd-4759-9883-21d842d0d26c@paulmck-laptop> <87zfymn6h9.fsf@oracle.com> Date: Thu, 07 Dec 2023 15:22:48 +0100 Message-ID: <87jzpqt7lz.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain 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 agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:24:45 -0800 (PST) On Wed, Dec 06 2023 at 17:31, Ankur Arora wrote: > If we end up needing this, is it valid to just optimistically check if > a quiescent state needs to be registered (see below)? > Though this version exposes rcu_data.rcu_urgent_qs outside RCU but maybe > we can encapsulate that in linux/rcupdate.h. > #ifdef CONFIG_PREEMPTION > #define preempt_enable() \ > do { \ > barrier(); \ > if (unlikely(preempt_count_dec_and_test())) \ > __preempt_schedule(); \ > + else if (unlikely(raw_cpu_read(rcu_data.rcu_urgent_qs))) \ > + rcu_all_qs_check(); It's still bloat and we can debate this once we come to the conclusion that the simple forced reschedule is not sufficient. Until then debating this is just an academic exercise. Thanks, tglx