Messages in this thread Patch in this message | | | From | wanghaibin <> | Subject | [RFC PATCH 1/4] workqueue: move the wq_update_unbound_numa_attrs_buf allocation location. | Date | Thu, 7 Jan 2016 20:38:56 +0800 |
| |
the wq_update_unbound_numa_attrs_buf will be useful, only when the wq_numa_enabled is true. if there is something wrong to cause the wq_numa_enable false, it can just return without the wq_update_unbound_numa_attrs_buf allocation.
This doesn't introduce any functional changes.
Signed-off-by: wanghaibin <wanghaibin.wang@huawei.com> --- kernel/workqueue.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index c579dba..d6cbe3d 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5180,9 +5180,6 @@ static void __init wq_numa_init(void) return; } - wq_update_unbound_numa_attrs_buf = alloc_workqueue_attrs(GFP_KERNEL); - BUG_ON(!wq_update_unbound_numa_attrs_buf); - /* * We want masks of possible CPUs of each node which isn't readily * available. Build one from cpu_to_node() which should have been @@ -5207,6 +5204,9 @@ static void __init wq_numa_init(void) wq_numa_possible_cpumask = tbl; wq_numa_enabled = true; + + wq_update_unbound_numa_attrs_buf = alloc_workqueue_attrs(GFP_KERNEL); + BUG_ON(!wq_update_unbound_numa_attrs_buf); } static int __init init_workqueues(void) -- 1.8.3.1
| |