linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
	Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	Davidlohr Bueso <dave@stgolabs.net>,
	rcu@vger.kernel.org
Subject: Re: [PATCH 27/34] rcu: Use CONFIG_PREEMPTION where appropriate
Date: Tue, 15 Oct 2019 21:14:41 -0700	[thread overview]
Message-ID: <20191016041441.GG2689@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <20191015191821.11479-28-bigeasy@linutronix.de>

On Tue, Oct 15, 2019 at 09:18:14PM +0200, Sebastian Andrzej Siewior wrote:
> The config option `CONFIG_PREEMPT' is used for the preemption model
> "Low-Latency Desktop". The config option `CONFIG_PREEMPTION' is enabled
> when kernel preemption is enabled which is true for the preemption model
> `CONFIG_PREEMPT' and `CONFIG_PREEMPT_RT'.
> 
> Use `CONFIG_PREEMPTION' if it applies to both preemption models and not
> just to `CONFIG_PREEMPT'.
> 
> Cc: "Paul E. McKenney" <paulmck@kernel.org>
> Cc: Josh Triplett <josh@joshtriplett.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Lai Jiangshan <jiangshanlai@gmail.com>
> Cc: Joel Fernandes <joel@joelfernandes.org>
> Cc: Davidlohr Bueso <dave@stgolabs.net>
> Cc: rcu@vger.kernel.org
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

This one does apply, so I have queued it for review and testing, thank you!

							Thanx, Paul

> ---
>  include/linux/rcupdate.h | 4 ++--
>  kernel/rcu/Kconfig       | 4 ++--
>  kernel/rcu/rcutorture.c  | 2 +-
>  kernel/rcu/srcutiny.c    | 2 +-
>  kernel/rcu/tree.c        | 4 ++--
>  kernel/rcu/tree_exp.h    | 2 +-
>  kernel/rcu/tree_plugin.h | 4 ++--
>  7 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> index 75a2eded7aa2c..1e3dad252d61f 100644
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -154,7 +154,7 @@ static inline void exit_tasks_rcu_finish(void) { }
>   *
>   * This macro resembles cond_resched(), except that it is defined to
>   * report potential quiescent states to RCU-tasks even if the cond_resched()
> - * machinery were to be shut off, as some advocate for PREEMPT kernels.
> + * machinery were to be shut off, as some advocate for PREEMPTION kernels.
>   */
>  #define cond_resched_tasks_rcu_qs() \
>  do { \
> @@ -580,7 +580,7 @@ do {									      \
>   *
>   * You can avoid reading and understanding the next paragraph by
>   * following this rule: don't put anything in an rcu_read_lock() RCU
> - * read-side critical section that would block in a !PREEMPT kernel.
> + * read-side critical section that would block in a !PREEMPTION kernel.
>   * But if you want the full story, read on!
>   *
>   * In non-preemptible RCU implementations (TREE_RCU and TINY_RCU),
> diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig
> index 7644eda17d624..01b56177464d8 100644
> --- a/kernel/rcu/Kconfig
> +++ b/kernel/rcu/Kconfig
> @@ -200,8 +200,8 @@ config RCU_NOCB_CPU
>  	  specified at boot time by the rcu_nocbs parameter.  For each
>  	  such CPU, a kthread ("rcuox/N") will be created to invoke
>  	  callbacks, where the "N" is the CPU being offloaded, and where
> -	  the "p" for RCU-preempt (PREEMPT kernels) and "s" for RCU-sched
> -	  (!PREEMPT kernels).  Nothing prevents this kthread from running
> +	  the "p" for RCU-preempt (PREEMPTION kernels) and "s" for RCU-sched
> +	  (!PREEMPTION kernels).  Nothing prevents this kthread from running
>  	  on the specified CPUs, but (1) the kthreads may be preempted
>  	  between each callback, and (2) affinity or cgroups can be used
>  	  to force the kthreads to run on whatever set of CPUs is desired.
> diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
> index 3c9feca1eab17..c070d103f34d6 100644
> --- a/kernel/rcu/rcutorture.c
> +++ b/kernel/rcu/rcutorture.c
> @@ -1725,7 +1725,7 @@ static void rcu_torture_fwd_cb_cr(struct rcu_head *rhp)
>  // Give the scheduler a chance, even on nohz_full CPUs.
>  static void rcu_torture_fwd_prog_cond_resched(unsigned long iter)
>  {
> -	if (IS_ENABLED(CONFIG_PREEMPT) && IS_ENABLED(CONFIG_NO_HZ_FULL)) {
> +	if (IS_ENABLED(CONFIG_PREEMPTION) && IS_ENABLED(CONFIG_NO_HZ_FULL)) {
>  		// Real call_rcu() floods hit userspace, so emulate that.
>  		if (need_resched() || (iter & 0xfff))
>  			schedule();
> diff --git a/kernel/rcu/srcutiny.c b/kernel/rcu/srcutiny.c
> index 44d6606b83257..6208c1dae5c95 100644
> --- a/kernel/rcu/srcutiny.c
> +++ b/kernel/rcu/srcutiny.c
> @@ -103,7 +103,7 @@ EXPORT_SYMBOL_GPL(__srcu_read_unlock);
>  
>  /*
>   * Workqueue handler to drive one grace period and invoke any callbacks
> - * that become ready as a result.  Single-CPU and !PREEMPT operation
> + * that become ready as a result.  Single-CPU and !PREEMPTION operation
>   * means that we get away with murder on synchronization.  ;-)
>   */
>  void srcu_drive_gp(struct work_struct *wp)
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index 81105141b6a82..1c5de816ae9e5 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2667,9 +2667,9 @@ EXPORT_SYMBOL_GPL(kfree_call_rcu);
>  
>  /*
>   * During early boot, any blocking grace-period wait automatically
> - * implies a grace period.  Later on, this is never the case for PREEMPT.
> + * implies a grace period.  Later on, this is never the case for PREEMPTION.
>   *
> - * Howevr, because a context switch is a grace period for !PREEMPT, any
> + * Howevr, because a context switch is a grace period for !PREEMPTION, any
>   * blocking grace-period wait automatically implies a grace period if
>   * there is only one CPU online at any point time during execution of
>   * either synchronize_rcu() or synchronize_rcu_expedited().  It is OK to
> diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h
> index d632cd0195975..98d078cafa5a6 100644
> --- a/kernel/rcu/tree_exp.h
> +++ b/kernel/rcu/tree_exp.h
> @@ -670,7 +670,7 @@ static void rcu_exp_handler(void *unused)
>  	}
>  }
>  
> -/* PREEMPT=y, so no PREEMPT=n expedited grace period to clean up after. */
> +/* PREEMPTION=y, so no PREEMPTION=n expedited grace period to clean up after. */
>  static void sync_sched_exp_online_cleanup(int cpu)
>  {
>  }
> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> index 2defc7fe74c39..e6c987d171cbe 100644
> --- a/kernel/rcu/tree_plugin.h
> +++ b/kernel/rcu/tree_plugin.h
> @@ -788,7 +788,7 @@ static void __init rcu_bootup_announce(void)
>  }
>  
>  /*
> - * Note a quiescent state for PREEMPT=n.  Because we do not need to know
> + * Note a quiescent state for PREEMPTION=n.  Because we do not need to know
>   * how many quiescent states passed, just if there was at least one since
>   * the start of the grace period, this just sets a flag.  The caller must
>   * have disabled preemption.
> @@ -838,7 +838,7 @@ void rcu_all_qs(void)
>  EXPORT_SYMBOL_GPL(rcu_all_qs);
>  
>  /*
> - * Note a PREEMPT=n context switch.  The caller must have disabled interrupts.
> + * Note a PREEMPTION=n context switch. The caller must have disabled interrupts.
>   */
>  void rcu_note_context_switch(bool preempt)
>  {
> -- 
> 2.23.0
> 

  reply	other threads:[~2019-10-16  4:14 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 19:17 [PATCH 00/34] Treewide: Use CONFIG_PREEMPTION Sebastian Andrzej Siewior
2019-10-15 19:17 ` [PATCH 01/34] ARM: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:17 ` [PATCH 02/34] arm64: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:17 ` [PATCH 03/34] powerpc: " Sebastian Andrzej Siewior
2019-10-16  4:57   ` Christophe Leroy
2019-10-16  7:48     ` Sebastian Andrzej Siewior
2019-10-16  9:33     ` Michael Ellerman
2019-10-16  9:35       ` Sebastian Andrzej Siewior
2019-10-24 13:59       ` [PATCH 03/34 v2] " Sebastian Andrzej Siewior
2019-10-24 16:04         ` [PATCH 03/34 v3] " Sebastian Andrzej Siewior
2019-11-12 12:38           ` Michael Ellerman
2019-12-08 14:58           ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:17 ` [PATCH 04/34] ARC: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:17 ` [PATCH 05/34] c6x: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:17 ` [PATCH 06/34] csky: " Sebastian Andrzej Siewior
2019-10-15 23:29   ` Guo Ren
2019-10-16  7:39     ` Sebastian Andrzej Siewior
2019-10-16 23:31       ` Guo Ren
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:17 ` [PATCH 07/34] h8300: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:17 ` [PATCH 08/34] hexagon: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:17 ` [PATCH 09/34] ia64: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:17 ` [PATCH 10/34] m68k/coldfire: " Sebastian Andrzej Siewior
2019-10-16  0:50   ` Greg Ungerer
2019-10-16  7:55     ` Sebastian Andrzej Siewior
2019-10-16 12:14       ` Greg Ungerer
2019-10-15 19:17 ` [PATCH 11/34] microblaze: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:17 ` [PATCH 12/34] MIPS: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:18 ` [PATCH 13/34] nds32: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:18 ` [PATCH 14/34] nios2: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:18 ` [PATCH 15/34] parisc: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:18 ` [PATCH 16/34] riscv: " Sebastian Andrzej Siewior
2019-10-15 20:26   ` Paul Walmsley
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:18 ` [PATCH 17/34] s390: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:18 ` [PATCH 18/34] sh: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:18 ` [PATCH 19/34] sparc: " Sebastian Andrzej Siewior
2019-10-15 20:34   ` David Miller
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:18 ` [PATCH 20/34] xtensa: " Sebastian Andrzej Siewior
2019-10-15 19:43   ` Max Filippov
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:18 ` [PATCH 21/34] net: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, net: Use CONFIG_PREEMPTION.patch tip-bot2 for Thomas Gleixner
2019-10-15 19:18 ` [PATCH 22/34] xen: Use CONFIG_PREEMPTION Sebastian Andrzej Siewior
2019-10-16  5:10   ` Jürgen Groß
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:18 ` [PATCH 23/34] fs: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:18 ` [PATCH 24/34] btrfs: " Sebastian Andrzej Siewior
2019-10-15 20:16   ` David Sterba
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:18 ` [PATCH 25/34] mm: " Sebastian Andrzej Siewior
2019-10-16 14:38   ` Christopher Lameter
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
2019-10-15 19:18 ` [PATCH 26/34] Documentation/RCU: Use CONFIG_PREEMPTION where appropriate Sebastian Andrzej Siewior
2019-10-16  4:13   ` Paul E. McKenney
2019-10-16  7:31     ` Sebastian Andrzej Siewior
2019-10-17  3:06       ` Paul E. McKenney
2019-10-15 19:18 ` [PATCH 27/34] rcu: " Sebastian Andrzej Siewior
2019-10-16  4:14   ` Paul E. McKenney [this message]
2019-10-15 19:18 ` [PATCH 28/34] drm/i810: Refer to `PREEMPTION' in comment Sebastian Andrzej Siewior
2019-10-16 19:58   ` Daniel Vetter
2019-10-15 19:18 ` [PATCH 29/34] backlight/jornada720: Use CONFIG_PREEMPTION Sebastian Andrzej Siewior
2019-10-17 11:37   ` Daniel Thompson
2019-10-17 13:23     ` Lee Jones
2019-10-17 13:28       ` Sebastian Andrzej Siewior
2019-10-18  7:38         ` Lee Jones
2019-10-18  7:40   ` Lee Jones
2019-10-15 19:18 ` [PATCH 30/34] media: cec-gpio: " Sebastian Andrzej Siewior
2019-10-15 19:53   ` Hans Verkuil
2019-10-16 11:51     ` Hans Verkuil
2019-10-16 12:02       ` Sebastian Andrzej Siewior
2019-10-16 12:24         ` Hans Verkuil
2019-10-15 19:18 ` [PATCH 31/34] locking: " Sebastian Andrzej Siewior
2019-10-16  8:18   ` Peter Zijlstra
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Sebastian Andrzej Siewior
2019-10-15 19:18 ` [PATCH 32/34] lib: " Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/core: " tip-bot2 for Sebastian Andrzej Siewior
2019-10-15 19:18 ` [PATCH 33/34] tracing: " Sebastian Andrzej Siewior
2019-10-15 19:24   ` Steven Rostedt
2019-10-15 19:18 ` [PATCH 34/34] workqueue: Use PREEMPTION Sebastian Andrzej Siewior
2019-12-08 14:58   ` [tip: sched/urgent] sched/rt, " tip-bot2 for Sebastian Andrzej Siewior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191016041441.GG2689@paulmck-ThinkPad-P72 \
    --to=paulmck@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=dave@stgolabs.net \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).