Skip to content

Commit 90326f0

Browse files
Sebastian Andrzej Siewiorpaulmckrcu
authored andcommitted
rcu: Use CONFIG_PREEMPTION where appropriate
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" <[email protected]> Cc: Josh Triplett <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Lai Jiangshan <[email protected]> Cc: Joel Fernandes <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent b3e627d commit 90326f0

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

include/linux/rcupdate.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static inline void exit_tasks_rcu_finish(void) { }
154154
*
155155
* This macro resembles cond_resched(), except that it is defined to
156156
* report potential quiescent states to RCU-tasks even if the cond_resched()
157-
* machinery were to be shut off, as some advocate for PREEMPT kernels.
157+
* machinery were to be shut off, as some advocate for PREEMPTION kernels.
158158
*/
159159
#define cond_resched_tasks_rcu_qs() \
160160
do { \
@@ -598,7 +598,7 @@ do { \
598598
*
599599
* You can avoid reading and understanding the next paragraph by
600600
* following this rule: don't put anything in an rcu_read_lock() RCU
601-
* read-side critical section that would block in a !PREEMPT kernel.
601+
* read-side critical section that would block in a !PREEMPTION kernel.
602602
* But if you want the full story, read on!
603603
*
604604
* In non-preemptible RCU implementations (pure TREE_RCU and TINY_RCU),

kernel/rcu/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ config RCU_NOCB_CPU
201201
specified at boot time by the rcu_nocbs parameter. For each
202202
such CPU, a kthread ("rcuox/N") will be created to invoke
203203
callbacks, where the "N" is the CPU being offloaded, and where
204-
the "p" for RCU-preempt (PREEMPT kernels) and "s" for RCU-sched
205-
(!PREEMPT kernels). Nothing prevents this kthread from running
204+
the "p" for RCU-preempt (PREEMPTION kernels) and "s" for RCU-sched
205+
(!PREEMPTION kernels). Nothing prevents this kthread from running
206206
on the specified CPUs, but (1) the kthreads may be preempted
207207
between each callback, and (2) affinity or cgroups can be used
208208
to force the kthreads to run on whatever set of CPUs is desired.

kernel/rcu/rcutorture.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1730,7 +1730,7 @@ static void rcu_torture_fwd_cb_cr(struct rcu_head *rhp)
17301730
// Give the scheduler a chance, even on nohz_full CPUs.
17311731
static void rcu_torture_fwd_prog_cond_resched(unsigned long iter)
17321732
{
1733-
if (IS_ENABLED(CONFIG_PREEMPT) && IS_ENABLED(CONFIG_NO_HZ_FULL)) {
1733+
if (IS_ENABLED(CONFIG_PREEMPTION) && IS_ENABLED(CONFIG_NO_HZ_FULL)) {
17341734
// Real call_rcu() floods hit userspace, so emulate that.
17351735
if (need_resched() || (iter & 0xfff))
17361736
schedule();

kernel/rcu/srcutiny.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ EXPORT_SYMBOL_GPL(__srcu_read_unlock);
103103

104104
/*
105105
* Workqueue handler to drive one grace period and invoke any callbacks
106-
* that become ready as a result. Single-CPU and !PREEMPT operation
106+
* that become ready as a result. Single-CPU and !PREEMPTION operation
107107
* means that we get away with murder on synchronization. ;-)
108108
*/
109109
void srcu_drive_gp(struct work_struct *wp)

kernel/rcu/tree.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2698,9 +2698,9 @@ EXPORT_SYMBOL_GPL(kfree_call_rcu);
26982698

26992699
/*
27002700
* During early boot, any blocking grace-period wait automatically
2701-
* implies a grace period. Later on, this is never the case for PREEMPT.
2701+
* implies a grace period. Later on, this is never the case for PREEMPTION.
27022702
*
2703-
* Howevr, because a context switch is a grace period for !PREEMPT, any
2703+
* Howevr, because a context switch is a grace period for !PREEMPTION, any
27042704
* blocking grace-period wait automatically implies a grace period if
27052705
* there is only one CPU online at any point time during execution of
27062706
* either synchronize_rcu() or synchronize_rcu_expedited(). It is OK to

kernel/rcu/tree_exp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ static void rcu_exp_handler(void *unused)
670670
}
671671
}
672672

673-
/* PREEMPT=y, so no PREEMPT=n expedited grace period to clean up after. */
673+
/* PREEMPTION=y, so no PREEMPTION=n expedited grace period to clean up after. */
674674
static void sync_sched_exp_online_cleanup(int cpu)
675675
{
676676
}

kernel/rcu/tree_plugin.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ static void __init rcu_bootup_announce(void)
789789
}
790790

791791
/*
792-
* Note a quiescent state for PREEMPT=n. Because we do not need to know
792+
* Note a quiescent state for PREEMPTION=n. Because we do not need to know
793793
* how many quiescent states passed, just if there was at least one since
794794
* the start of the grace period, this just sets a flag. The caller must
795795
* have disabled preemption.
@@ -839,7 +839,7 @@ void rcu_all_qs(void)
839839
EXPORT_SYMBOL_GPL(rcu_all_qs);
840840

841841
/*
842-
* Note a PREEMPT=n context switch. The caller must have disabled interrupts.
842+
* Note a PREEMPTION=n context switch. The caller must have disabled interrupts.
843843
*/
844844
void rcu_note_context_switch(bool preempt)
845845
{

0 commit comments

Comments
 (0)