lkml.org 
[lkml]   [2016]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 1/4] workqueue: move the wq_update_unbound_numa_attrs_buf allocation location.
Date
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



\
 
 \ /
  Last update: 2016-01-07 14:21    [W:0.079 / U:1.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site