diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-07-24 17:31:00 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2013-08-14 11:14:57 -0400 |
commit | 73867dcd0792ad14fb31bfe73d09d9a4576f7fc2 (patch) | |
tree | e15ed0b725226805eaa3f1852c97c8257761fe8e /kernel/time | |
parent | af2350bd12096dfd04e1090b90bfecea1f75f84e (diff) |
nohz: Rename a few state variables
Rename the full dynticks's cpumask and cpumask state variables
to some more exportable names.
These will be used later from global headers to optimize
the main full dynticks APIs in conjunction with static keys.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Kevin Hilman <khilman@linaro.org>
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/tick-sched.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 91a2528b5f44..b28dee43e644 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -149,8 +149,8 @@ static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs) | |||
149 | } | 149 | } |
150 | 150 | ||
151 | #ifdef CONFIG_NO_HZ_FULL | 151 | #ifdef CONFIG_NO_HZ_FULL |
152 | static cpumask_var_t nohz_full_mask; | 152 | static cpumask_var_t tick_nohz_full_mask; |
153 | bool have_nohz_full_mask; | 153 | bool tick_nohz_full_running; |
154 | 154 | ||
155 | static bool can_stop_full_tick(void) | 155 | static bool can_stop_full_tick(void) |
156 | { | 156 | { |
@@ -183,7 +183,7 @@ static bool can_stop_full_tick(void) | |||
183 | * Don't allow the user to think they can get | 183 | * Don't allow the user to think they can get |
184 | * full NO_HZ with this machine. | 184 | * full NO_HZ with this machine. |
185 | */ | 185 | */ |
186 | WARN_ONCE(have_nohz_full_mask, | 186 | WARN_ONCE(tick_nohz_full_running, |
187 | "NO_HZ FULL will not work with unstable sched clock"); | 187 | "NO_HZ FULL will not work with unstable sched clock"); |
188 | return false; | 188 | return false; |
189 | } | 189 | } |
@@ -240,11 +240,11 @@ static void nohz_full_kick_ipi(void *info) | |||
240 | */ | 240 | */ |
241 | void tick_nohz_full_kick_all(void) | 241 | void tick_nohz_full_kick_all(void) |
242 | { | 242 | { |
243 | if (!have_nohz_full_mask) | 243 | if (!tick_nohz_full_running) |
244 | return; | 244 | return; |
245 | 245 | ||
246 | preempt_disable(); | 246 | preempt_disable(); |
247 | smp_call_function_many(nohz_full_mask, | 247 | smp_call_function_many(tick_nohz_full_mask, |
248 | nohz_full_kick_ipi, NULL, false); | 248 | nohz_full_kick_ipi, NULL, false); |
249 | preempt_enable(); | 249 | preempt_enable(); |
250 | } | 250 | } |
@@ -272,10 +272,10 @@ out: | |||
272 | 272 | ||
273 | int tick_nohz_full_cpu(int cpu) | 273 | int tick_nohz_full_cpu(int cpu) |
274 | { | 274 | { |
275 | if (!have_nohz_full_mask) | 275 | if (!tick_nohz_full_running) |
276 | return 0; | 276 | return 0; |
277 | 277 | ||
278 | return cpumask_test_cpu(cpu, nohz_full_mask); | 278 | return cpumask_test_cpu(cpu, tick_nohz_full_mask); |
279 | } | 279 | } |
280 | 280 | ||
281 | /* Parse the boot-time nohz CPU list from the kernel parameters. */ | 281 | /* Parse the boot-time nohz CPU list from the kernel parameters. */ |
@@ -283,18 +283,18 @@ static int __init tick_nohz_full_setup(char *str) | |||
283 | { | 283 | { |
284 | int cpu; | 284 | int cpu; |
285 | 285 | ||
286 | alloc_bootmem_cpumask_var(&nohz_full_mask); | 286 | alloc_bootmem_cpumask_var(&tick_nohz_full_mask); |
287 | if (cpulist_parse(str, nohz_full_mask) < 0) { | 287 | if (cpulist_parse(str, tick_nohz_full_mask) < 0) { |
288 | pr_warning("NOHZ: Incorrect nohz_full cpumask\n"); | 288 | pr_warning("NOHZ: Incorrect nohz_full cpumask\n"); |
289 | return 1; | 289 | return 1; |
290 | } | 290 | } |
291 | 291 | ||
292 | cpu = smp_processor_id(); | 292 | cpu = smp_processor_id(); |
293 | if (cpumask_test_cpu(cpu, nohz_full_mask)) { | 293 | if (cpumask_test_cpu(cpu, tick_nohz_full_mask)) { |
294 | pr_warning("NO_HZ: Clearing %d from nohz_full range for timekeeping\n", cpu); | 294 | pr_warning("NO_HZ: Clearing %d from nohz_full range for timekeeping\n", cpu); |
295 | cpumask_clear_cpu(cpu, nohz_full_mask); | 295 | cpumask_clear_cpu(cpu, tick_nohz_full_mask); |
296 | } | 296 | } |
297 | have_nohz_full_mask = true; | 297 | tick_nohz_full_running = true; |
298 | 298 | ||
299 | return 1; | 299 | return 1; |
300 | } | 300 | } |
@@ -312,7 +312,7 @@ static int tick_nohz_cpu_down_callback(struct notifier_block *nfb, | |||
312 | * If we handle the timekeeping duty for full dynticks CPUs, | 312 | * If we handle the timekeeping duty for full dynticks CPUs, |
313 | * we can't safely shutdown that CPU. | 313 | * we can't safely shutdown that CPU. |
314 | */ | 314 | */ |
315 | if (have_nohz_full_mask && tick_do_timer_cpu == cpu) | 315 | if (tick_nohz_full_running && tick_do_timer_cpu == cpu) |
316 | return NOTIFY_BAD; | 316 | return NOTIFY_BAD; |
317 | break; | 317 | break; |
318 | } | 318 | } |
@@ -331,14 +331,14 @@ static int tick_nohz_init_all(void) | |||
331 | int err = -1; | 331 | int err = -1; |
332 | 332 | ||
333 | #ifdef CONFIG_NO_HZ_FULL_ALL | 333 | #ifdef CONFIG_NO_HZ_FULL_ALL |
334 | if (!alloc_cpumask_var(&nohz_full_mask, GFP_KERNEL)) { | 334 | if (!alloc_cpumask_var(&tick_nohz_full_mask, GFP_KERNEL)) { |
335 | pr_err("NO_HZ: Can't allocate full dynticks cpumask\n"); | 335 | pr_err("NO_HZ: Can't allocate full dynticks cpumask\n"); |
336 | return err; | 336 | return err; |
337 | } | 337 | } |
338 | err = 0; | 338 | err = 0; |
339 | cpumask_setall(nohz_full_mask); | 339 | cpumask_setall(tick_nohz_full_mask); |
340 | cpumask_clear_cpu(smp_processor_id(), nohz_full_mask); | 340 | cpumask_clear_cpu(smp_processor_id(), tick_nohz_full_mask); |
341 | have_nohz_full_mask = true; | 341 | tick_nohz_full_running = true; |
342 | #endif | 342 | #endif |
343 | return err; | 343 | return err; |
344 | } | 344 | } |
@@ -347,20 +347,20 @@ void __init tick_nohz_init(void) | |||
347 | { | 347 | { |
348 | int cpu; | 348 | int cpu; |
349 | 349 | ||
350 | if (!have_nohz_full_mask) { | 350 | if (!tick_nohz_full_running) { |
351 | if (tick_nohz_init_all() < 0) | 351 | if (tick_nohz_init_all() < 0) |
352 | return; | 352 | return; |
353 | } | 353 | } |
354 | 354 | ||
355 | for_each_cpu(cpu, nohz_full_mask) | 355 | for_each_cpu(cpu, tick_nohz_full_mask) |
356 | context_tracking_cpu_set(cpu); | 356 | context_tracking_cpu_set(cpu); |
357 | 357 | ||
358 | cpu_notifier(tick_nohz_cpu_down_callback, 0); | 358 | cpu_notifier(tick_nohz_cpu_down_callback, 0); |
359 | cpulist_scnprintf(nohz_full_buf, sizeof(nohz_full_buf), nohz_full_mask); | 359 | cpulist_scnprintf(nohz_full_buf, sizeof(nohz_full_buf), tick_nohz_full_mask); |
360 | pr_info("NO_HZ: Full dynticks CPUs: %s.\n", nohz_full_buf); | 360 | pr_info("NO_HZ: Full dynticks CPUs: %s.\n", nohz_full_buf); |
361 | } | 361 | } |
362 | #else | 362 | #else |
363 | #define have_nohz_full_mask (0) | 363 | #define tick_nohz_full_running (0) |
364 | #endif | 364 | #endif |
365 | 365 | ||
366 | /* | 366 | /* |
@@ -738,7 +738,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts) | |||
738 | return false; | 738 | return false; |
739 | } | 739 | } |
740 | 740 | ||
741 | if (have_nohz_full_mask) { | 741 | if (tick_nohz_full_running) { |
742 | /* | 742 | /* |
743 | * Keep the tick alive to guarantee timekeeping progression | 743 | * Keep the tick alive to guarantee timekeeping progression |
744 | * if there are full dynticks CPUs around | 744 | * if there are full dynticks CPUs around |