As we prepare for offloading the residual 1hz scheduler ticks to workqueue, let's affine those to housekeepers so that they don't interrupt the CPUs that don't want to be disturbed.
Unified · Split
| @@ -12,6 +12,7 @@ enum hk_flags { · 11 unmodified lines | |||
| 12 | HK_FLAG_SCHED = (1 << 3), | 12 | HK_FLAG_SCHED = (1 << 3), |
| 13 | HK_FLAG_TICK = (1 << 4), | 13 | HK_FLAG_TICK = (1 << 4), |
| 14 | HK_FLAG_DOMAIN = (1 << 5), | 14 | HK_FLAG_DOMAIN = (1 << 5), |
| 15 | HK_FLAG_WQ = (1 << 6), | ||
| 15 | }; | 16 | }; |
| 16 | 17 | ||
| 17 | #ifdef CONFIG_CPU_ISOLATION | 18 | #ifdef CONFIG_CPU_ISOLATION |
| @@ -3,6 +3,7 @@ · 2 unmodified lines | |||
| 3 | * any CPU: unbound workqueues, timers, kthreads and any offloadable work. | 3 | * any CPU: unbound workqueues, timers, kthreads and any offloadable work. |
| 4 | * | 4 | * |
| 5 | * Copyright (C) 2017 Red Hat, Inc., Frederic Weisbecker | 5 | * Copyright (C) 2017 Red Hat, Inc., Frederic Weisbecker |
| 6 | * Copyright (C) 2017-2018 SUSE, Frederic Weisbecker | ||
| 6 | * | 7 | * |
| 7 | */ | 8 | */ |
| 8 | 9 | ||
| @@ -119,7 +120,7 @@ static int __init housekeeping_nohz_full_setup(char *str) · 110 unmodified lines | |||
| 119 | { | 120 | { |
| 120 | unsigned int flags; | 121 | unsigned int flags; |
| 121 | 122 | ||
| 122 | flags = HK_FLAG_TICK | HK_FLAG_TIMER | HK_FLAG_RCU | HK_FLAG_MISC; | 123 | flags = HK_FLAG_TICK | HK_FLAG_WQ | HK_FLAG_TIMER | HK_FLAG_RCU | HK_FLAG_MISC; |
| 123 | 124 | ||
| 124 | return housekeeping_setup(str, flags); | 125 | return housekeeping_setup(str, flags); |
| 125 | } | 126 | } |
| @@ -5565,12 +5565,13 @@ static void __init wq_numa_init(void) · 5564 unmodified lines | |||
| 5565 | int __init workqueue_init_early(void) | 5565 | int __init workqueue_init_early(void) |
| 5566 | { | 5566 | { |
| 5567 | int std_nice[NR_STD_WORKER_POOLS] = { 0, HIGHPRI_NICE_LEVEL }; | 5567 | int std_nice[NR_STD_WORKER_POOLS] = { 0, HIGHPRI_NICE_LEVEL }; |
| 5568 | int hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ; | ||
| 5568 | int i, cpu; | 5569 | int i, cpu; |
| 5569 | 5570 | ||
| 5570 | WARN_ON(__alignof__(struct pool_workqueue) < __alignof__(long long)); | 5571 | WARN_ON(__alignof__(struct pool_workqueue) < __alignof__(long long)); |
| 5571 | 5572 | ||
| 5572 | BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL)); | 5573 | BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL)); |
| 5573 | cpumask_copy(wq_unbound_cpumask, housekeeping_cpumask(HK_FLAG_DOMAIN)); | 5574 | cpumask_copy(wq_unbound_cpumask, housekeeping_cpumask(hk_flags)); |
| 5574 | 5575 | ||
| 5575 | pwq_cache = KMEM_CACHE(pool_workqueue, SLAB_PANIC); | 5576 | pwq_cache = KMEM_CACHE(pool_workqueue, SLAB_PANIC); |
| 5576 | 5577 | ||