Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2934382pxy; Mon, 3 May 2021 11:12:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxw4SJgab5EgZdY1lk1e3s8pF4jpLXP5jGtvC1zMwqUatYCz4HS4Ezfny9H2hCLv6/QKJ+N X-Received: by 2002:a63:9c01:: with SMTP id f1mr19670993pge.427.1620065525236; Mon, 03 May 2021 11:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620065525; cv=none; d=google.com; s=arc-20160816; b=qo8kACPXh513SqhcM+FszWdub9eMxiKbyM9KgJe2oZiOzoy5d1WgaNvKXgEWXliXO+ IpVIq3R1y/sA0PCW3vNLCffI5G6iV8ceRcLd6BL38SbnRg84l6TrI6FBaGimudxyuvZc mGvDhr5BmhtswarKiRIx0u/4Y67h6YBFUrHWa3sy7bfKi7vTW/OXrnRkKwCBpMhbffxc w10io5Zb9T4OF5NibrCgzzMPyZi72/RAHLeJag8cqlxvFO/TbH4mE1S7EVhQ+U48cQXf BdQ7wtGxfmizzj/el8cQYq6JnUZRyTBl1O/1bj0vizDp/lhGS/ypFED924mKrK0qqiOO 2YjA== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=EmszBqEjlCWHuQy6sv7FUv1ai8hOH1DtWZSa+Dp9k+c=; b=0flRtbNKeH0b29Y/ysgkVSSxZ/1XYvbnXkMlPq7AK/zdaqpQcg4f1c8sqBVRbwzYjR +xdGxjbLiuHkJ00VXix3csoYrstB2gUCc0AxGeP41mQqBPELNYc9X2p7uxI1DvGLe3LZ F8R9TN7kciyabdwg5fOnPUqhMVCZ5bjxZK2YvMq+plAK2uqQplbm6eFO5DC+eapDTni8 l6oum2wSjta8JLuZrbcJt11jCU5MOQ3S9W00t+chkM4I6PxEVzqsLDXVgRGnUUzmtzY4 3km7tC/PSmqT6YcNJl73xOKSB+DJd9L+rbOBSjcaJMevNA4n+8VBbeLUtmDCmrpWM+Bc is0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cycEVgaT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n1si656527plf.135.2021.05.03.11.11.52; Mon, 03 May 2021 11:12:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cycEVgaT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231248AbhECQdo (ORCPT + 99 others); Mon, 3 May 2021 12:33:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:34656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231182AbhECQdn (ORCPT ); Mon, 3 May 2021 12:33:43 -0400 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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