sched: Change the name of preempt mode from full to low_latency
Subsystems (3)
PATCH 1/1 sched: Change the name of preempt mode from full to low_latency
There is a similar name fully in Kconfig.preempt, but it corresponds to PREEMPT_RT. In order to distinguish them, change the name of preempt mode from full to low_latency.
Also, define a global array and variable that used to save preempt mode name and size.
--- .../admin-guide/kernel-parameters.txt | 2 +- include/linux/sched.h | 8 ++-- kernel/sched/core.c | 43 ++++++++++--------- kernel/sched/debug.c | 5 +-- kernel/sched/sched.h | 2 + kernel/trace/trace.c | 4 +- 6 files changed, 32 insertions(+), 32 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +1 -1
@@ -4581,7 +4581,7 @@ Select preemption mode if you have CONFIG_PREEMPT_DYNAMIC none - Limited to cond_resched() calls voluntary - Limited to cond_resched() and might_sleep() calls - full - Any section that isn't explicitly preempt disabled + low_latency - Any section that isn't explicitly preempt disabled can be preempted anytime. print-fatal-signals=
include/linux/sched.h +4 -4
@@ -2181,7 +2181,7 @@ static inline void cond_resched_rcu(void)extern bool preempt_model_none (void );extern bool preempt_model_voluntary (void ); -extern bool preempt_model_full (void ); +extern bool preempt_model_low_latency (void );#else
@@ -2193,14 +2193,14 @@ static inline bool preempt_model_voluntary(void) {return IS_ENABLED (CONFIG_PREEMPT_VOLUNTARY ); } -static inline bool preempt_model_full (void ) +static inline bool preempt_model_low_latency (void ) {return IS_ENABLED (CONFIG_PREEMPT ); }#endif -static inline bool preempt_model_rt (void ) +static inline bool preempt_model_fully (void ) {return IS_ENABLED (CONFIG_PREEMPT_RT ); }
@@ -2215,7 +2215,7 @@ static inline bool preempt_model_rt(void)*/ static inline bool preempt_model_preemptible (void ) { -return preempt_model_full () ||preempt_model_rt (); +return preempt_model_low_latency () ||preempt_model_fully (); }/*
kernel/sched/core.c +22 -21
102 lines not on this page · raw message
kernel/sched/debug.c +1 -4
@@ -244,12 +244,9 @@ static ssize_t sched_dynamic_write(struct file *filp, const char __user *ubuf,static int sched_dynamic_show (struct seq_file *m,void *v) { -static const char * preempt_modes[] = { -"none" ,"voluntary" ,"full" - };int i; -for (i =0 ; i <ARRAY_SIZE (preempt_modes); i++) { +for (i =0 ; i < preempt_modes_size; i++) {if (preempt_dynamic_mode == i)seq_puts (m,"(" );seq_puts (m, preempt_modes[i]);
kernel/sched/sched.h +2 -0
@@ -3276,6 +3276,8 @@ extern int try_to_wake_up(struct task_struct *tsk, unsigned int state, int wake_#ifdef CONFIG_PREEMPT_DYNAMIC extern int preempt_dynamic_mode; +extern const char *preempt_modes[]; +extern int preempt_modes_size;extern int sched_dynamic_mode (const char *str);extern void sched_dynamic_update (int mode);#endif
kernel/trace/trace.c +2 -2
@@ -4394,8 +4394,8 @@ print_trace_header(struct seq_file *m, struct trace_iterator *iter) buf->cpu,preempt_model_none () ?"server" :preempt_model_voluntary () ?"desktop" : -preempt_model_full () ?"preempt" : -preempt_model_rt () ?"preempt_rt" : +preempt_model_low_latency () ?"preempt" : +preempt_model_fully () ?"preempt_rt" :"unknown" ,/* These are reserved for later use */ 0, 0, 0, 0);
Signature · 1 line
2.25.1
Peter Zijlstra
maintainerQuoted 6 lines · Yajun Deng
There is a similar name fully in
Kconfig.preempt, but it corresponds toPREEMPT_RT. In order to distinguish them, change the name of preempt mode from full tolow_latency.Also, define a global array and variable that used to save preempt mode name and size.
Yeah, let's not rename this for giggles. Regular preemption is a fully preemptible kernel model. No need to invent new names for it.