2 * Housekeeping management. Manage the targets for routine code that can run on
3 * any CPU: unbound workqueues, timers, kthreads and any offloadable work.
5 * Copyright (C) 2017 Red Hat, Inc., Frederic Weisbecker
9 #include <linux/sched/isolation.h>
10 #include <linux/tick.h>
11 #include <linux/init.h>
12 #include <linux/kernel.h>
14 cpumask_var_t housekeeping_mask;
16 void __init housekeeping_init(void)
18 if (!tick_nohz_full_enabled())
21 if (!alloc_cpumask_var(&housekeeping_mask, GFP_KERNEL)) {
22 WARN(1, "NO_HZ: Can't allocate not-full dynticks cpumask\n");
23 cpumask_clear(tick_nohz_full_mask);
24 tick_nohz_full_running = false;
28 cpumask_andnot(housekeeping_mask,
29 cpu_possible_mask, tick_nohz_full_mask);
31 /* We need at least one CPU to handle housekeeping work */
32 WARN_ON_ONCE(cpumask_empty(housekeeping_mask));