Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3974735rdg; Wed, 18 Oct 2023 11:01:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFaUofuLcG9d2Hbmj640pW1ss5eFNKAPcFJbUxWkA6eCF3qDpfrzjEh6P4ObiE+1pFT1MWD X-Received: by 2002:a05:6e02:219b:b0:357:72e5:4adf with SMTP id j27-20020a056e02219b00b0035772e54adfmr93347ila.26.1697652108705; Wed, 18 Oct 2023 11:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697652108; cv=none; d=google.com; s=arc-20160816; b=oBjaLh1KpSbsTmLMLXuwcqP2EZn9WYwK88U9FXdDcJSJQnwmATh1pasJMH+lTH/8TU HxlcDcfKun8MheAwGAKpsxStH+oO+lhf1Q/ZhAIXFtXavVpVHQ3Okp+vleJHWgS8jLoA 5ED0IKQhRmTG3Cepq6few7ae+yQBa7JpcZQ9GxMaFObRzFxieG912CfKnpNTBuAKDIOC +NQSP4JD0VquHBp8U5rX2e84hV9XaQ+dKoO29pw1SFVutSoRHpL3yUc6fTMTVHEXpNMi dhYcx8IwGwndcWBh8pmVBhf4AGJb/2o4X/gaa49vSm78PG16axyXrS+TPzpWPl2p8jca H25g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=KqbOAMgoLgja3LXutdRe+jaewzx5Ztt8c3ZO+t7PYRE=; fh=CNKe5v0LVNjZigLtVbTOPl07qw95xakyb7CXYIiHcxk=; b=ttiuIOYwh/jrIJbfEUnBToy2hazPJhf4milpJvlemERedpMCY5LPxcirjSBOCU6Uyy ii4qs2QJv33LSzhYRkSz/JexKfW18QLP4djZK832gJn5fImMZEYoKPA8Dig2K1OhMpYl R8rFKfegHINhIZTBi3GA7R57xFyek0G38oUstecYxJRpRspKMAhVi1YdAT8dBSked5Di CsNpDA7hTVjm4MnMH7QiqkDe2djbg3AnRNI7P1RtZxBLlPip2KVTPQupZ3+Qn6My1sG8 Ynhk07glNA+ZFQNV4v7nVUva2pr4lDI/EGa8jADUH+TVP878wxNSBkT0knMhpNk/77uh dxqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id u11-20020a056a00124b00b006b4d80642bbsi4668610pfi.182.2023.10.18.11.01.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 11:01:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 1D0058221109; Wed, 18 Oct 2023 11:01:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232694AbjJRSA7 (ORCPT + 99 others); Wed, 18 Oct 2023 14:00:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232772AbjJRSAn (ORCPT ); Wed, 18 Oct 2023 14:00:43 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE2C313A for ; Wed, 18 Oct 2023 11:00:39 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6858C433C7; Wed, 18 Oct 2023 18:00:36 +0000 (UTC) Date: Wed, 18 Oct 2023 14:00:35 -0400 From: Steven Rostedt To: "Paul E. McKenney" Cc: Thomas Gleixner , Linus Torvalds , Peter Zijlstra , Ankur Arora , linux-kernel@vger.kernel.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, Frederic Weisbecker , Daniel Bristot de Oliveira Subject: Re: [PATCH v2 7/9] sched: define TIF_ALLOW_RESCHED Message-ID: <20231018140035.107f5177@gandalf.local.home> In-Reply-To: References: <87ttrngmq0.ffs@tglx> <87jzshhexi.ffs@tglx> <87pm1c3wbn.ffs@tglx> <20231018103146.4856caa8@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Wed, 18 Oct 2023 11:01:38 -0700 (PDT) On Wed, 18 Oct 2023 10:55:02 -0700 "Paul E. McKenney" wrote: > > If everything becomes PREEMPT_RCU, then the above should be able to be > > turned into just: > > > > if (!disable_irq) > > local_irq_disable(); > > > > rcu_momentary_dyntick_idle(); > > > > if (!disable_irq) > > local_irq_enable(); > > > > And no cond_resched() is needed. > > Even given that CONFIG_PREEMPT_RCU=n still exists, the fact that > run_osnoise() is running in kthread context with preemption and everything > else enabled (am I right?), then the change you suggest should work fine. There's a user space option that lets you run that loop with preemption and/or interrupts disabled. > > > > Again. There is no non-preemtible RCU with this model, unless I'm > > > missing something important here. > > > > Daniel? > > But very happy to defer to Daniel. ;-) But Daniel could also correct me ;-) -- Steve