diff options
-rw-r--r-- | Documentation/kernel-parameters.txt | 4 | ||||
-rw-r--r-- | include/linux/tick.h | 6 | ||||
-rw-r--r-- | kernel/sched/core.c | 6 | ||||
-rw-r--r-- | kernel/time/Kconfig | 4 | ||||
-rw-r--r-- | kernel/time/tick-broadcast.c | 2 | ||||
-rw-r--r-- | kernel/time/tick-common.c | 2 | ||||
-rw-r--r-- | kernel/time/tick-sched.c | 54 |
7 files changed, 39 insertions, 39 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 231698feaddc..82365dde00a8 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1913,8 +1913,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1913 | Valid arguments: on, off | 1913 | Valid arguments: on, off |
1914 | Default: on | 1914 | Default: on |
1915 | 1915 | ||
1916 | nohz_extended= [KNL,BOOT] | 1916 | nohz_full= [KNL,BOOT] |
1917 | In kernels built with CONFIG_NO_HZ_EXTENDED=y, set | 1917 | In kernels built with CONFIG_NO_HZ_FULL=y, set |
1918 | the specified list of CPUs whose tick will be stopped | 1918 | the specified list of CPUs whose tick will be stopped |
1919 | whenever possible. You need to keep at least one online | 1919 | whenever possible. You need to keep at least one online |
1920 | CPU outside the range to maintain the timekeeping. | 1920 | CPU outside the range to maintain the timekeeping. |
diff --git a/include/linux/tick.h b/include/linux/tick.h index 5e403339ee14..b4e3b0c9639e 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
@@ -157,10 +157,10 @@ static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return -1; } | |||
157 | static inline u64 get_cpu_iowait_time_us(int cpu, u64 *unused) { return -1; } | 157 | static inline u64 get_cpu_iowait_time_us(int cpu, u64 *unused) { return -1; } |
158 | # endif /* !CONFIG_NO_HZ_COMMON */ | 158 | # endif /* !CONFIG_NO_HZ_COMMON */ |
159 | 159 | ||
160 | #ifdef CONFIG_NO_HZ_EXTENDED | 160 | #ifdef CONFIG_NO_HZ_FULL |
161 | extern int tick_nohz_extended_cpu(int cpu); | 161 | extern int tick_nohz_full_cpu(int cpu); |
162 | #else | 162 | #else |
163 | static inline int tick_nohz_extended_cpu(int cpu) { return 0; } | 163 | static inline int tick_nohz_full_cpu(int cpu) { return 0; } |
164 | #endif | 164 | #endif |
165 | 165 | ||
166 | 166 | ||
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 9bb397da63d6..0f0a5b3fd62c 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -617,9 +617,9 @@ static void wake_up_idle_cpu(int cpu) | |||
617 | smp_send_reschedule(cpu); | 617 | smp_send_reschedule(cpu); |
618 | } | 618 | } |
619 | 619 | ||
620 | static bool wake_up_extended_nohz_cpu(int cpu) | 620 | static bool wake_up_full_nohz_cpu(int cpu) |
621 | { | 621 | { |
622 | if (tick_nohz_extended_cpu(cpu)) { | 622 | if (tick_nohz_full_cpu(cpu)) { |
623 | if (cpu != smp_processor_id() || | 623 | if (cpu != smp_processor_id() || |
624 | tick_nohz_tick_stopped()) | 624 | tick_nohz_tick_stopped()) |
625 | smp_send_reschedule(cpu); | 625 | smp_send_reschedule(cpu); |
@@ -631,7 +631,7 @@ static bool wake_up_extended_nohz_cpu(int cpu) | |||
631 | 631 | ||
632 | void wake_up_nohz_cpu(int cpu) | 632 | void wake_up_nohz_cpu(int cpu) |
633 | { | 633 | { |
634 | if (!wake_up_extended_nohz_cpu(cpu)) | 634 | if (!wake_up_full_nohz_cpu(cpu)) |
635 | wake_up_idle_cpu(cpu); | 635 | wake_up_idle_cpu(cpu); |
636 | } | 636 | } |
637 | 637 | ||
diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig index cbe64be17d1f..4a17b5069466 100644 --- a/kernel/time/Kconfig +++ b/kernel/time/Kconfig | |||
@@ -96,7 +96,7 @@ config NO_HZ_IDLE | |||
96 | 96 | ||
97 | Most of the time you want to say Y here. | 97 | Most of the time you want to say Y here. |
98 | 98 | ||
99 | config NO_HZ_EXTENDED | 99 | config NO_HZ_FULL |
100 | bool "Full dynticks system (tickless single task)" | 100 | bool "Full dynticks system (tickless single task)" |
101 | # NO_HZ_COMMON dependency | 101 | # NO_HZ_COMMON dependency |
102 | depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS | 102 | depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS |
@@ -115,7 +115,7 @@ config NO_HZ_EXTENDED | |||
115 | task on the CPU. Chances for running tickless are maximized when | 115 | task on the CPU. Chances for running tickless are maximized when |
116 | the task mostly runs in userspace and has few kernel activity. | 116 | the task mostly runs in userspace and has few kernel activity. |
117 | 117 | ||
118 | You need to fill up the nohz_extended boot parameter with the | 118 | You need to fill up the nohz_full boot parameter with the |
119 | desired range of dynticks CPUs. | 119 | desired range of dynticks CPUs. |
120 | 120 | ||
121 | This is implemented at the expense of some overhead in user <-> kernel | 121 | This is implemented at the expense of some overhead in user <-> kernel |
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index 8a6875cc1879..a3a3123f6272 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
@@ -573,7 +573,7 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc) | |||
573 | bc->event_handler = tick_handle_oneshot_broadcast; | 573 | bc->event_handler = tick_handle_oneshot_broadcast; |
574 | 574 | ||
575 | /* Take the do_timer update */ | 575 | /* Take the do_timer update */ |
576 | if (!tick_nohz_extended_cpu(cpu)) | 576 | if (!tick_nohz_full_cpu(cpu)) |
577 | tick_do_timer_cpu = cpu; | 577 | tick_do_timer_cpu = cpu; |
578 | 578 | ||
579 | /* | 579 | /* |
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index b7dc0cbdb59b..83f2bd967161 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c | |||
@@ -163,7 +163,7 @@ static void tick_setup_device(struct tick_device *td, | |||
163 | * this cpu: | 163 | * this cpu: |
164 | */ | 164 | */ |
165 | if (tick_do_timer_cpu == TICK_DO_TIMER_BOOT) { | 165 | if (tick_do_timer_cpu == TICK_DO_TIMER_BOOT) { |
166 | if (!tick_nohz_extended_cpu(cpu)) | 166 | if (!tick_nohz_full_cpu(cpu)) |
167 | tick_do_timer_cpu = cpu; | 167 | tick_do_timer_cpu = cpu; |
168 | else | 168 | else |
169 | tick_do_timer_cpu = TICK_DO_TIMER_NONE; | 169 | tick_do_timer_cpu = TICK_DO_TIMER_NONE; |
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index e057d338daa4..369b5769fc97 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -113,7 +113,7 @@ static void tick_sched_do_timer(ktime_t now) | |||
113 | * jiffies_lock. | 113 | * jiffies_lock. |
114 | */ | 114 | */ |
115 | if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_NONE) | 115 | if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_NONE) |
116 | && !tick_nohz_extended_cpu(cpu)) | 116 | && !tick_nohz_full_cpu(cpu)) |
117 | tick_do_timer_cpu = cpu; | 117 | tick_do_timer_cpu = cpu; |
118 | #endif | 118 | #endif |
119 | 119 | ||
@@ -143,29 +143,29 @@ static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs) | |||
143 | profile_tick(CPU_PROFILING); | 143 | profile_tick(CPU_PROFILING); |
144 | } | 144 | } |
145 | 145 | ||
146 | #ifdef CONFIG_NO_HZ_EXTENDED | 146 | #ifdef CONFIG_NO_HZ_FULL |
147 | static cpumask_var_t nohz_extended_mask; | 147 | static cpumask_var_t nohz_full_mask; |
148 | bool have_nohz_extended_mask; | 148 | bool have_nohz_full_mask; |
149 | 149 | ||
150 | int tick_nohz_extended_cpu(int cpu) | 150 | int tick_nohz_full_cpu(int cpu) |
151 | { | 151 | { |
152 | if (!have_nohz_extended_mask) | 152 | if (!have_nohz_full_mask) |
153 | return 0; | 153 | return 0; |
154 | 154 | ||
155 | return cpumask_test_cpu(cpu, nohz_extended_mask); | 155 | return cpumask_test_cpu(cpu, nohz_full_mask); |
156 | } | 156 | } |
157 | 157 | ||
158 | /* Parse the boot-time nohz CPU list from the kernel parameters. */ | 158 | /* Parse the boot-time nohz CPU list from the kernel parameters. */ |
159 | static int __init tick_nohz_extended_setup(char *str) | 159 | static int __init tick_nohz_full_setup(char *str) |
160 | { | 160 | { |
161 | alloc_bootmem_cpumask_var(&nohz_extended_mask); | 161 | alloc_bootmem_cpumask_var(&nohz_full_mask); |
162 | if (cpulist_parse(str, nohz_extended_mask) < 0) | 162 | if (cpulist_parse(str, nohz_full_mask) < 0) |
163 | pr_warning("NOHZ: Incorrect nohz_extended cpumask\n"); | 163 | pr_warning("NOHZ: Incorrect nohz_full cpumask\n"); |
164 | else | 164 | else |
165 | have_nohz_extended_mask = true; | 165 | have_nohz_full_mask = true; |
166 | return 1; | 166 | return 1; |
167 | } | 167 | } |
168 | __setup("nohz_extended=", tick_nohz_extended_setup); | 168 | __setup("nohz_full=", tick_nohz_full_setup); |
169 | 169 | ||
170 | static int __cpuinit tick_nohz_cpu_down_callback(struct notifier_block *nfb, | 170 | static int __cpuinit tick_nohz_cpu_down_callback(struct notifier_block *nfb, |
171 | unsigned long action, | 171 | unsigned long action, |
@@ -179,7 +179,7 @@ static int __cpuinit tick_nohz_cpu_down_callback(struct notifier_block *nfb, | |||
179 | * If we handle the timekeeping duty for full dynticks CPUs, | 179 | * If we handle the timekeeping duty for full dynticks CPUs, |
180 | * we can't safely shutdown that CPU. | 180 | * we can't safely shutdown that CPU. |
181 | */ | 181 | */ |
182 | if (have_nohz_extended_mask && tick_do_timer_cpu == cpu) | 182 | if (have_nohz_full_mask && tick_do_timer_cpu == cpu) |
183 | return -EINVAL; | 183 | return -EINVAL; |
184 | break; | 184 | break; |
185 | } | 185 | } |
@@ -191,20 +191,20 @@ static int __cpuinit tick_nohz_cpu_down_callback(struct notifier_block *nfb, | |||
191 | * separations: 0,2,4,6,... | 191 | * separations: 0,2,4,6,... |
192 | * This is NR_CPUS + sizeof('\0') | 192 | * This is NR_CPUS + sizeof('\0') |
193 | */ | 193 | */ |
194 | static char __initdata nohz_ext_buf[NR_CPUS + 1]; | 194 | static char __initdata nohz_full_buf[NR_CPUS + 1]; |
195 | 195 | ||
196 | static int __init init_tick_nohz_extended(void) | 196 | static int __init init_tick_nohz_full(void) |
197 | { | 197 | { |
198 | cpumask_var_t online_nohz; | 198 | cpumask_var_t online_nohz; |
199 | int cpu; | 199 | int cpu; |
200 | 200 | ||
201 | if (!have_nohz_extended_mask) | 201 | if (!have_nohz_full_mask) |
202 | return 0; | 202 | return 0; |
203 | 203 | ||
204 | cpu_notifier(tick_nohz_cpu_down_callback, 0); | 204 | cpu_notifier(tick_nohz_cpu_down_callback, 0); |
205 | 205 | ||
206 | if (!zalloc_cpumask_var(&online_nohz, GFP_KERNEL)) { | 206 | if (!zalloc_cpumask_var(&online_nohz, GFP_KERNEL)) { |
207 | pr_warning("NO_HZ: Not enough memory to check extended nohz mask\n"); | 207 | pr_warning("NO_HZ: Not enough memory to check full nohz mask\n"); |
208 | return -ENOMEM; | 208 | return -ENOMEM; |
209 | } | 209 | } |
210 | 210 | ||
@@ -215,31 +215,31 @@ static int __init init_tick_nohz_extended(void) | |||
215 | get_online_cpus(); | 215 | get_online_cpus(); |
216 | 216 | ||
217 | /* Ensure we keep a CPU outside the dynticks range for timekeeping */ | 217 | /* Ensure we keep a CPU outside the dynticks range for timekeeping */ |
218 | cpumask_and(online_nohz, cpu_online_mask, nohz_extended_mask); | 218 | cpumask_and(online_nohz, cpu_online_mask, nohz_full_mask); |
219 | if (cpumask_equal(online_nohz, cpu_online_mask)) { | 219 | if (cpumask_equal(online_nohz, cpu_online_mask)) { |
220 | pr_warning("NO_HZ: Must keep at least one online CPU " | 220 | pr_warning("NO_HZ: Must keep at least one online CPU " |
221 | "out of nohz_extended range\n"); | 221 | "out of nohz_full range\n"); |
222 | /* | 222 | /* |
223 | * We know the current CPU doesn't have its tick stopped. | 223 | * We know the current CPU doesn't have its tick stopped. |
224 | * Let's use it for the timekeeping duty. | 224 | * Let's use it for the timekeeping duty. |
225 | */ | 225 | */ |
226 | preempt_disable(); | 226 | preempt_disable(); |
227 | cpu = smp_processor_id(); | 227 | cpu = smp_processor_id(); |
228 | pr_warning("NO_HZ: Clearing %d from nohz_extended range\n", cpu); | 228 | pr_warning("NO_HZ: Clearing %d from nohz_full range\n", cpu); |
229 | cpumask_clear_cpu(cpu, nohz_extended_mask); | 229 | cpumask_clear_cpu(cpu, nohz_full_mask); |
230 | preempt_enable(); | 230 | preempt_enable(); |
231 | } | 231 | } |
232 | put_online_cpus(); | 232 | put_online_cpus(); |
233 | free_cpumask_var(online_nohz); | 233 | free_cpumask_var(online_nohz); |
234 | 234 | ||
235 | cpulist_scnprintf(nohz_ext_buf, sizeof(nohz_ext_buf), nohz_extended_mask); | 235 | cpulist_scnprintf(nohz_full_buf, sizeof(nohz_full_buf), nohz_full_mask); |
236 | pr_info("NO_HZ: Full dynticks CPUs: %s.\n", nohz_ext_buf); | 236 | pr_info("NO_HZ: Full dynticks CPUs: %s.\n", nohz_full_buf); |
237 | 237 | ||
238 | return 0; | 238 | return 0; |
239 | } | 239 | } |
240 | core_initcall(init_tick_nohz_extended); | 240 | core_initcall(init_tick_nohz_full); |
241 | #else | 241 | #else |
242 | #define have_nohz_extended_mask (0) | 242 | #define have_nohz_full_mask (0) |
243 | #endif | 243 | #endif |
244 | 244 | ||
245 | /* | 245 | /* |
@@ -589,7 +589,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts) | |||
589 | return false; | 589 | return false; |
590 | } | 590 | } |
591 | 591 | ||
592 | if (have_nohz_extended_mask) { | 592 | if (have_nohz_full_mask) { |
593 | /* | 593 | /* |
594 | * Keep the tick alive to guarantee timekeeping progression | 594 | * Keep the tick alive to guarantee timekeeping progression |
595 | * if there are full dynticks CPUs around | 595 | * if there are full dynticks CPUs around |