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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C536CDB47E for ; Wed, 18 Oct 2023 18:00:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E4E7C8D0183; Wed, 18 Oct 2023 14:00:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DAF568D0016; Wed, 18 Oct 2023 14:00:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C77838D0183; Wed, 18 Oct 2023 14:00:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id B87518D0016 for ; Wed, 18 Oct 2023 14:00:42 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 882D21603EC for ; Wed, 18 Oct 2023 18:00:42 +0000 (UTC) X-FDA: 81359347524.03.A1DEBDF Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf27.hostedemail.com (Postfix) with ESMTP id B035240038 for ; Wed, 18 Oct 2023 18:00:40 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf27.hostedemail.com: domain of "SRS0=xY8f=GA=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=xY8f=GA=goodmis.org=rostedt@kernel.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697652040; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KqbOAMgoLgja3LXutdRe+jaewzx5Ztt8c3ZO+t7PYRE=; b=w3b7qVe5dxYS3sAHBTxdfopQWufZhwDERG0gZlBxnBtzbpDbJOQ4eop6CQlEJFynunmutc 6UyaSXd+3h9zrEefXrEwED3eybvZdhJhbJFqDNlIphTxS86v0sXzKnTd5mkVZJ/PU//r9E Wz/avFEfN/0JFHLxIU40d3kIXfNEmi4= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf27.hostedemail.com: domain of "SRS0=xY8f=GA=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=xY8f=GA=goodmis.org=rostedt@kernel.org" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697652040; a=rsa-sha256; cv=none; b=XOTeyS/LqRYhk/vyPzODAhCa5rInpaGY8uEYoxE4S6OH8W+tZU7OnaQRy1GTKfmnt+W7L6 Qq4NlJrn4ZXJ3zB6PJ1MWjSCRJuC+4uQKG9QZUniyGZC7PKEvaRfr0liXXIvV6/8Zbv+YN s7HupQaXEgf6ftP2w237tmV4dxHNv2Q= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id C520F618BF; Wed, 18 Oct 2023 18:00:39 +0000 (UTC) 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-Rspamd-Queue-Id: B035240038 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: idae8ptk4mq73qpgn8oqpb8q3bftcgzx X-HE-Tag: 1697652040-987290 X-HE-Meta: U2FsdGVkX1+9gqsXMcNLyI9aLGgKFa5KYGOBInmYXCHkLDidUVxgR7HW/vS3o9VFNiZBmgaTcf02jPAd7NJK+qrsrG3Ej66TvIdu2qW32fx+aC/ZQKY5bzkYRFCWyBmpOeW2yiNa+iiYfmvVKPD3l6wECMOlRzazqmA8DN0BbeUsVpKs7xJeeiajDPlGZIymdDpnjvv9N2aV3Ady2TmCHkOrJzlzxioP0rUmJnJAzom+Xb0ud4CCRxE4F0/sbSxk9sHvUC1fm+fH2T3o1Ad3vi0J1Ma1FU4NEFznK0pWwwr72//an2/txar1luBMtOon4zBtsQsnFylBAQrNX+GHNuyjqwV5w7KvB/5OZHZtYr41u9l8slppZm08WOtAA4oXuBY7bEAmAmDESwPSN+Eo2DBPYbXCgeMjw440+mU53qEcHwr58u1C/970tY+DLzXZ2Esv6hmydaMf2G9CtEUT1wedl6OwT0vY/ojuRJ+Q8aG3mgJNfGNvX9z58qVhFcZGd4ZlYvFYMhvI3UeiHH5cubG0BuXoZsRYd1sH+yEVMEZtmgRvweVQSRErYEfKgcwGq57KVjtrlmREvlPnUwiiG+HZaSaJCLO6JQs8xYPQ5JpTThonShyydUZ2JegVi5hjoGOzHjWfWqGPWZy8mPdEr2z0oSScYAzJ5iPfUczHBWpg01KLWbhd+H7cb/6TGVSLDWNuSpMwaNxTVuMDDV0JAeTDSRm0OIgBt3I/PrMTkAJqrT8SBmGqi5++bxsvJvoQ48WCO4t06wOtbO8bMWsuTkzX8AXUBglOQiL+yu8VQnhopXQCUDGnoNHbksskar3ol4b6Ubz/B4QxmSMwcs7BhHKdno+iufYcEQTj0C7RON3bzTu45APCkxx9IW6CmAsNYp1dBSkJvDOGZgnZc7UDWXseLkuBYvoqACT5Eac2PhndPw7XjpZpqHc2vlQBaZEL6zBjfnGJzhXy7WIowoI xr3n5aIU rGsXcOTwPTUfd9GGOqd10Ql8GaZFWpie7TdFYxxCSrk3g47/4ldapGxwnDuN/1I7kMXIp3LIO7dHl8zcWOZ22XqkQ2TVa86hAsYvfduSlVa+T9Nd8M+Bmj9mStkxcZiL2DNKO5soVg3zakp+ItMpcCZtPALD6l9r7lnKPfGh7dyoNw7C/N4wuQlwOSSwdgYmj4x4Y45Jny1+G6frTvdRrk79gW12cVfbVQujT48AeivGEO7lHz/r2ML61ZE7VbYOMA+tYigHhJBkfTaEgkGjJdMB/BwVcoDLNSN/zoDr1mB8j/ft7z+fuUf122Zox8Crc+Yc8embdmKGKCRF2vySHsicecO9LgVHSC3KLrtJSPPEhv1w= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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