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=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 597F0C433ED for ; Mon, 3 May 2021 16:32:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C8362611CB for ; Mon, 3 May 2021 16:32:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C8362611CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3CCAF6B0036; Mon, 3 May 2021 12:32:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3692F6B006E; Mon, 3 May 2021 12:32:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 20A4F6B0070; Mon, 3 May 2021 12:32:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0204.hostedemail.com [216.40.44.204]) by kanga.kvack.org (Postfix) with ESMTP id 08B006B0036 for ; Mon, 3 May 2021 12:32:52 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B2C7512DE for ; Mon, 3 May 2021 16:32:51 +0000 (UTC) X-FDA: 78100463742.10.29B0ED6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf14.hostedemail.com (Postfix) with ESMTP id 28C9BC0007C4 for ; Mon, 3 May 2021 16:32:32 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 1860E611AE; Mon, 3 May 2021 16:32:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620059570; bh=QTzchORJulSOFGHbgrOpsW5Aa1pjTXf6cVwUx0HhGCc=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=cycEVgaTuT5m9GKQhAXj9weAF+yCZArQ+fKu7Lxpj2J3h5H5P33oFomgUpVkec73A JsS9Jp8ipgvdxzDoaK/nr+OxPEWxdIzZoxSyQC2Oy2xOZhmYLyAjP35VdsBbx+XUEj z2WEcj6AIS7g23Ch2dQwuQTXjxuWdyr4+axfE5SU4IuNTt9Enl8Ebw7Bc/WXPX4KYu ZXjNQwBuZDVfatcr7TcAx0YeoMuhTF5L4594TUvK6RReIbxqgS+1y0YP4186VK2NzG KrBrYP7qYeAsiW7bVkaGUme6ltb62OvrMRMd4lIVvC90KmW/aposID3vHouVdo3Rh1 /1a4BdDxzLTuQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id A8B185C034B; Mon, 3 May 2021 09:32:49 -0700 (PDT) Date: Mon, 3 May 2021 09:32:49 -0700 From: "Paul E. McKenney" To: Michel Lespinasse Cc: Andy Lutomirski , Linux-MM , Laurent Dufour , Peter Zijlstra , Michal Hocko , Matthew Wilcox , Rik van Riel , Andrew Morton , Suren Baghdasaryan , Joel Fernandes , Rom Lemarchand , Linux-Kernel Subject: Re: [RFC PATCH 13/37] mm: implement speculative handling in __handle_mm_fault(). Message-ID: <20210503163249.GW975577@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20210428145823.GA856@lespinasse.org> <20210428161108.GP975577@paulmck-ThinkPad-P17-Gen-1> <20210429000225.GC10973@lespinasse.org> <20210429155250.GV975577@paulmck-ThinkPad-P17-Gen-1> <20210429183412.GA278623@paulmck-ThinkPad-P17-Gen-1> <20210429211758.GE10973@lespinasse.org> <20210503034049.GQ975577@paulmck-ThinkPad-P17-Gen-1> <20210503043430.GA16059@lespinasse.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210503043430.GA16059@lespinasse.org> Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=cycEVgaT; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf14.hostedemail.com: domain of "SRS0=XIR6=J6=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" designates 198.145.29.99 as permitted sender) smtp.mailfrom="SRS0=XIR6=J6=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 28C9BC0007C4 X-Stat-Signature: 3xbj3mgq4yztwhjhicpqrzhyubkdnz44 Received-SPF: none (kernel.org>: No applicable sender policy available) receiver=imf14; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1620059552-532832 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 Sun, May 02, 2021 at 09:34:30PM -0700, Michel Lespinasse wrote: > On Sun, May 02, 2021 at 08:40:49PM -0700, Paul E. McKenney wrote: > > @@ -634,6 +644,12 @@ do { \ > > * sections, invocation of the corresponding RCU callback is deferred > > * until after the all the other CPUs exit their critical sections. > > * > > + * In recent kernels, synchronize_rcu() and call_rcu() also wait for > > + * regions of code with preemption disabled, including regions of code > > + * with interrupts or softirqs disabled. If your kernel is old enough > > + * for synchronize_sched() to be defined, only code enclosed within > > + * rcu_read_lock() and rcu_read_unlock() are guaranteed to be waited for. > > + * > > * Note, however, that RCU callbacks are permitted to run concurrently > > * with new RCU read-side critical sections. One way that this can happen > > * is via the following sequence of events: (1) CPU 0 enters an RCU > > You still have "old enough" / "recent kernels" here. But maybe it's OK > given that you added relevant version numbers elsewhere. > > Everything else looks great to me. Good point! Like this? Thanx, Paul ------------------------------------------------------------------------ commit fd8393a2a8a5ffd25d0766abb262137c36bda9f3 Author: Paul E. McKenney Date: Mon May 3 09:32:14 2021 -0700 fixup! rcu: Improve comments describing RCU read-side critical sections Signed-off-by: Paul E. McKenney diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 901ab6fa252b..323954363389 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -644,11 +644,11 @@ do { \ * sections, invocation of the corresponding RCU callback is deferred * until after the all the other CPUs exit their critical sections. * - * In recent kernels, synchronize_rcu() and call_rcu() also wait for - * regions of code with preemption disabled, including regions of code - * with interrupts or softirqs disabled. If your kernel is old enough - * for synchronize_sched() to be defined, only code enclosed within - * rcu_read_lock() and rcu_read_unlock() are guaranteed to be waited for. + * In v5.0 and later kernels, synchronize_rcu() and call_rcu() also + * wait for regions of code with preemption disabled, including regions of + * code with interrupts or softirqs disabled. In pre-v5.0 kernels, which + * define synchronize_sched(), only code enclosed within rcu_read_lock() + * and rcu_read_unlock() are guaranteed to be waited for. * * Note, however, that RCU callbacks are permitted to run concurrently * with new RCU read-side critical sections. One way that this can happen