[PATCH 5/5] workqueue: retry on NUMA_NO_NODE when create_worker() fails

2014-12-12 Thread Lai Jiangshan
...@jp.fujitsu.com Cc: Gu, Zheng guz.f...@cn.fujitsu.com Cc: tangchen tangc...@cn.fujitsu.com Cc: Hiroyuki KAMEZAWA kamezawa.hir...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel/workqueue.c | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git

[PATCH 0/5] workqueue: fix bug when numa mapping is changed

2014-12-12 Thread Lai Jiangshan
...@jp.fujitsu.com Lai Jiangshan (5): workqueue: fix memory leak in wq_numa_init() workqueue: update wq_numa_possible_cpumask workqueue: fixup existing pool-node workqueue: update NUMA affinity for the node lost CPU workqueue: retry on NUMA_NO_NODE when create_worker() fails kernel

[PATCH 4/5] workqueue: update NUMA affinity for the node lost CPU

2014-12-12 Thread Lai Jiangshan
the affinity in this case. Cc: Tejun Heo t...@kernel.org Cc: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com Cc: Gu, Zheng guz.f...@cn.fujitsu.com Cc: tangchen tangc...@cn.fujitsu.com Cc: Hiroyuki KAMEZAWA kamezawa.hir...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel

[PATCH 1/5] workqueue: fix memory leak in wq_numa_init()

2014-12-12 Thread Lai Jiangshan
kamezawa.hir...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel/workqueue.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 09b685d..a6fd2b8 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c

[PATCH 2/5] workqueue: update wq_numa_possible_cpumask

2014-12-12 Thread Lai Jiangshan
: tangchen tangc...@cn.fujitsu.com Cc: Hiroyuki KAMEZAWA kamezawa.hir...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel/workqueue.c | 42 +- 1 files changed, 41 insertions(+), 1 deletions(-) diff --git a/kernel/workqueue.c b/kernel

Re: [PATCH 3/5] workqueue: fixup existing pool-node

2014-12-14 Thread Lai Jiangshan
On 12/13/2014 01:25 AM, Tejun Heo wrote: On Fri, Dec 12, 2014 at 06:19:53PM +0800, Lai Jiangshan wrote: Yasuaki Ishimatsu hit a bug when the numa mapping between CPU and node is changed. And the previous path fixup wq_numa_possible_cpumask. (See more information form the changelog

Re: [PATCH 4/5] workqueue: update NUMA affinity for the node lost CPU

2014-12-14 Thread Lai Jiangshan
On 12/13/2014 01:27 AM, Tejun Heo wrote: On Fri, Dec 12, 2014 at 06:19:54PM +0800, Lai Jiangshan wrote: We fixed the major cases when the numa mapping is changed. We still have the assumption that when the node-cpu mapping is changed the original node is offline, and the current code

Re: [PATCH 0/5] workqueue: fix bug when numa mapping is changed

2014-12-14 Thread Lai Jiangshan
[ 890.156187] [81093d10] ? kthread_create_on_node+0x1b0/0x1b0 [ 890.156187] ---[ end trace 39abbfc9f93402f4 ]--- Thanks, Yasuaki Ishimatsu (2014/12/12 19:19), Lai Jiangshan wrote: Workqueue code has an assumption that the numa mapping is stable after system booted. It is incorrectly

Re: [PATCH 2/5] workqueue: update wq_numa_possible_cpumask

2014-12-14 Thread Lai Jiangshan
On 12/13/2014 01:18 AM, Tejun Heo wrote: On Fri, Dec 12, 2014 at 06:19:52PM +0800, Lai Jiangshan wrote: ... +static void wq_update_numa_mapping(int cpu) +{ +int node, orig_node = NUMA_NO_NODE, new_node = cpu_to_node(cpu); + +lockdep_assert_held(wq_pool_mutex

Re: [PATCH 3/4] workqueue: remove per-node unbound pool when node goes offline.

2014-12-14 Thread Lai Jiangshan
On 12/14/2014 12:35 AM, Kamezawa Hiroyuki wrote: remove node aware unbound pools if node goes offline. scan unbound workqueue and remove numa affine pool when a node goes offline. Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com --- kernel/workqueue.c | 29

Re: [PATCH 4/4] workqueue: handle change in cpu-node relationship.

2014-12-14 Thread Lai Jiangshan
On 12/14/2014 12:38 AM, Kamezawa Hiroyuki wrote: Although workqueue detects relationship between cpu-node at boot, it is finally determined in cpu_up(). This patch tries to update pool-node using online status of cpus. 1. When a node goes down, clear per-cpu pool's node attr. 2. When a cpu

Re: [PATCH 4/4] workqueue: handle change in cpu-node relationship.

2014-12-14 Thread Lai Jiangshan
On 12/15/2014 10:20 AM, Kamezawa Hiroyuki wrote: (2014/12/15 11:12), Lai Jiangshan wrote: On 12/14/2014 12:38 AM, Kamezawa Hiroyuki wrote: Although workqueue detects relationship between cpu-node at boot, it is finally determined in cpu_up(). This patch tries to update pool-node using online

Re: [PATCH 4/4] workqueue: handle change in cpu-node relationship.

2014-12-14 Thread Lai Jiangshan
On 12/15/2014 10:55 AM, Kamezawa Hiroyuki wrote: (2014/12/15 11:48), Lai Jiangshan wrote: On 12/15/2014 10:20 AM, Kamezawa Hiroyuki wrote: (2014/12/15 11:12), Lai Jiangshan wrote: On 12/14/2014 12:38 AM, Kamezawa Hiroyuki wrote: Although workqueue detects relationship between cpu-node at boot

Re: [PATCH 4/4] workqueue: handle change in cpu-node relationship.

2014-12-14 Thread Lai Jiangshan
On 12/15/2014 10:55 AM, Kamezawa Hiroyuki wrote: (2014/12/15 11:48), Lai Jiangshan wrote: On 12/15/2014 10:20 AM, Kamezawa Hiroyuki wrote: (2014/12/15 11:12), Lai Jiangshan wrote: On 12/14/2014 12:38 AM, Kamezawa Hiroyuki wrote: Although workqueue detects relationship between cpu-node at boot

Re: [PATCH 4/4] workqueue: handle change in cpu-node relationship.

2014-12-14 Thread Lai Jiangshan
On 12/15/2014 12:04 PM, Kamezawa Hiroyuki wrote: (2014/12/15 12:34), Lai Jiangshan wrote: On 12/15/2014 10:55 AM, Kamezawa Hiroyuki wrote: (2014/12/15 11:48), Lai Jiangshan wrote: On 12/15/2014 10:20 AM, Kamezawa Hiroyuki wrote: (2014/12/15 11:12), Lai Jiangshan wrote: On 12/14/2014 12:38 AM

Re: [PATCH 1/5] workqueue: fix memory leak in wq_numa_init()

2014-12-14 Thread Lai Jiangshan
On 12/13/2014 01:12 AM, Tejun Heo wrote: On Fri, Dec 12, 2014 at 06:19:51PM +0800, Lai Jiangshan wrote: wq_numa_init() will quit directly on some bonkers cases without freeing the memory. Add the missing cleanup code. Cc: Tejun Heo t...@kernel.org Cc: Yasuaki Ishimatsu isimatu.yasu

Re: [PATCH/RFC] workqueue: allow rescuer thread to do more work.

2014-11-06 Thread Lai Jiangshan
maybe_create_worker() looping. ?? Yeah, that'd be a better condition and can work out. Can you please write up a patch to do that and do some synthetic tests excercising the code path? Also please cc Lai Jiangshan la...@cn.fujitsu.com when posting the patch. This issue looks exactly like

Re: [PATCH - v3?] workqueue: allow rescuer thread to do more work.

2014-11-17 Thread Lai Jiangshan
On 11/18/2014 12:27 PM, NeilBrown wrote: When there is serious memory pressure, all workers in a pool could be blocked, and a new thread cannot be created because it requires memory allocation. In this situation a WQ_MEM_RECLAIM workqueue will wake up the rescuer thread to do some work.

[PATCH] rcu: revert Allow post-unlock reference for rt_mutex to avoid priority-inversion

2014-11-18 Thread Lai Jiangshan
); } Just revert the patch to avoid it. Cc: Thomas Gleixner t...@linutronix.de Cc: Steven Rostedt rost...@goodmis.org Cc: Peter Zijlstra pet...@infradead.org Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel/rcu/tree.h|5 - kernel/rcu/tree_plugin.h |8 +--- 2 files

Re: [PATCH vfs 1/2] lib: implement ptrset

2014-11-18 Thread Lai Jiangshan
On 11/14/2014 06:09 AM, Tejun Heo wrote: Implement set of pointers. Pointers can be added, deleted and iterated. It's currently implemented as a thin rbtree wrapper making addition and removal O(log N). A drawback is that iteration isn't RCU safe, which is okay for now. This will be used

Re: frequent lockups in 3.18rc4

2014-12-02 Thread Lai Jiangshan
On 12/02/2014 03:14 AM, Paul E. McKenney wrote: On Sun, Nov 30, 2014 at 11:02:43PM -0200, Dâniel Fraga wrote: On Sun, 30 Nov 2014 16:21:19 -0800 Linus Torvalds torva...@linux-foundation.org wrote: Maybe you'll have to turn off RCU_CPU_STALL_VERBOSE first. Although I think you should be able

Re: frequent lockups in 3.18rc4

2014-12-02 Thread Lai Jiangshan
On 12/03/2014 12:58 AM, Dâniel Fraga wrote: On Tue, 2 Dec 2014 16:40:37 +0800 Lai Jiangshan la...@cn.fujitsu.com wrote: It is needed at lest for testing. CONFIG_TREE_PREEMPT_RCU=y with CONFIG_PREEMPT=n is needed for testing too. Please enable them (or enable them under CONFIG_RCU_TRACE=y

Re: [PATCH 1/4] workqueue:Fix unbound workqueue's node affinity detection

2014-12-15 Thread Lai Jiangshan
On 12/15/2014 07:14 PM, Kamezawa Hiroyuki wrote: Unbound wq pool's node attribute is calculated at its allocation. But it's now calculated based on possible cpu-node information which can be wrong after cpu hotplug/unplug. If wrong pool-node is set, following allocation error will happen.

Re: [PATCH 2/4] workqueue: update per-cpu workqueue's node affinity at,online-offline

2014-12-15 Thread Lai Jiangshan
On 12/15/2014 07:16 PM, Kamezawa Hiroyuki wrote: The percpu workqueue pool are persistend and never be freed. But cpu-node relationship can be changed by cpu hotplug and pool-node can point to an offlined node. If pool-node points to an offlined node, following allocation failure can

Re: [PATCH 3/4] workqueue: Update workqueue's possible cpumask when a new node, coming up.

2014-12-15 Thread Lai Jiangshan
On 12/15/2014 07:18 PM, Kamezawa Hiroyuki wrote: Workqueue keeps cpu-node relationship including all possible cpus. The original information was made at boot but it may change when a new node is added. Update information if a new node is ready with using node-hotplug callback.

Re: [PATCH 1/4] workqueue:Fix unbound workqueue's node affinity detection

2014-12-15 Thread Lai Jiangshan
On 12/16/2014 03:32 PM, Kamezawa Hiroyuki wrote: (2014/12/16 14:30), Lai Jiangshan wrote: On 12/15/2014 07:14 PM, Kamezawa Hiroyuki wrote: Unbound wq pool's node attribute is calculated at its allocation. But it's now calculated based on possible cpu-node information which can be wrong after

Re: [PATCH 1/2] workqueue: update numa affinity info at node hotplug

2014-12-16 Thread Lai Jiangshan
On 12/17/2014 12:45 AM, Kamezawa Hiroyuki wrote: With node online/offline, cpu-node relationship is established. Workqueue uses a info which was established at boot time but it may be changed by node hotpluging. Once pool-node points to a stale node, following allocation failure happens.

Re: [PATCH 2/5] workqueue: update wq_numa_possible_cpumask

2014-12-17 Thread Lai Jiangshan
On 12/12/2014 06:19 PM, Lai Jiangshan wrote: Yasuaki Ishimatsu hit a allocation failure bug when the numa mapping between CPU and node is changed. This was the last scene: SLUB: Unable to allocate memory on node 2 (gfp=0x80d0) cache: kmalloc-192, object size: 192, buffer size: 192, default

[RFC PATCH 0/2] tiny_rcu: simplify tiny_rcu

2014-11-28 Thread Lai Jiangshan
can change rcu_bh_qs() rcu_idle/irq_enter/exit() to static-inline-functions to reduce the binary size after these two patches accepted. Thanks, Lai Cc: Josh Triplett j...@joshtriplett.org Cc: Steven Rostedt rost...@goodmis.org Cc: Mathieu Desnoyers mathieu.desnoy...@efficios.com Lai Jiangshan (2

[RFC PATCH 1/2] record rcu_bh quiescent state in RCU_SOFTIRQ

2014-11-28 Thread Lai Jiangshan
directly in call_rcu_bh(). Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel/rcu/tiny.c | 38 +- 1 files changed, 17 insertions(+), 21 deletions(-) diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c index 805b6d5..f8e19ac 100644 --- a/kernel/rcu/tiny.c

[RFC PATCH 2/2] tiny_rcu: resched when call_rcu_sched() on idle_task

2014-11-28 Thread Lai Jiangshan
()rcu_sched_qs() QS,and GP and advance cb QS,and GP and advance cb wake up the ksoftirqd wake up the ksoftirqd set resched resched to ksoftirqd (or other) resched to ksoftirqd (or other) These two code patches are almost the same. Signed-off-by: Lai Jiangshan

Re: [PATCH - v3?] workqueue: allow rescuer thread to do more work.

2014-12-03 Thread Lai Jiangshan
On 12/04/2014 02:02 AM, Tejun Heo wrote: So, something like the following. Only compile tested. I'll test it and post proper patches w/ due credits. Thanks. Index: work/kernel/workqueue.c === ---

Re: [PATCH] tinification: Make SRCU optional by using CONFIG_SRCU

2014-12-04 Thread Lai Jiangshan
On 12/05/2014 08:11 AM, Paul E. McKenney wrote: On Thu, Dec 04, 2014 at 06:50:24PM -0500, Pranith Kumar wrote: SRCU is not necessary to be compiled by default in all cases. For tinification efforts not compiling SRCU unless necessary is desirable. The current patch tries to make compiling

Re: [PATCH workqueue/for-3.18-fixes 1/2] workqueue: invert the order between pool-lock and wq_mayday_lock

2014-12-04 Thread Lai Jiangshan
with the planned rescuer_thread() update. Let's invert them. This doesn't cause any behavior differences. Signed-off-by: Tejun Heo t...@kernel.org Cc: NeilBrown ne...@suse.de Cc: Dongsu Park dongsu.p...@profitbricks.com Cc: Lai Jiangshan la...@cn.fujitsu.com Reviewed-by: Lai Jiangshan la

Re: [PATCH wq/for-3.19] workqueue: cosmetic update in rescuer_thread()

2014-12-04 Thread Lai Jiangshan
-off-by: Tejun Heo t...@kernel.org --- Reviewed-by: Lai Jiangshan la...@cn.fujitsu.com Applying to wq/for-3.19. Thanks. kernel/workqueue.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -2246,7 +2246,7 @@ repeat

Re: [PATCH] kthread: kthread_bind fails to enforce CPU affinity (fixes kernel BUG at kernel/smpboot.c:134!)

2014-12-08 Thread Lai Jiangshan
On 12/08/2014 09:54 PM, Steven Rostedt wrote: On Mon, 8 Dec 2014 14:27:01 +1100 Anton Blanchard an...@samba.org wrote: I have a busy ppc64le KVM box where guests sometimes hit the infamous kernel BUG at kernel/smpboot.c:134! issue during boot: BUG_ON(td-cpu != smp_processor_id());

Re: [RFC PATCH 0/2] tiny_rcu: simplify tiny_rcu

2014-12-09 Thread Lai Jiangshan
On 11/28/2014 11:42 PM, Paul E. McKenney wrote: On Fri, Nov 28, 2014 at 05:43:31PM +0800, Lai Jiangshan wrote: Hi, Paul These two patches use the special feture of the UP system: In UP, quiescent state == grace period. For rcu_bh, rcu_process_callbacks() == a bh == QS == GP so we can

[PATCH] tiny_rcu: directly force QS when call_rcu_[bh|sched]() on idle_task

2014-12-09 Thread Lai Jiangshan
: size kernel/rcu/tiny-old.o kernel/rcu/tiny-patched.o textdata bss dec hex filename 3449 206 83663 e4f kernel/rcu/tiny-old.o 2406 144 82558 9fe kernel/rcu/tiny-patched.o Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel/rcu

Re: [PATCH 1/2] workqueue: update numa affinity info at node hotplug

2015-01-14 Thread Lai Jiangshan
On 01/14/2015 09:57 PM, Tejun Heo wrote: Hello, Lai. On Wed, Jan 14, 2015 at 10:47:16AM +0800, Lai Jiangshan wrote: Even if that involves slightly more code, that's the right thing to do at this point. Right, but in currently, the workqueue will be the only user, and I don't known

Re: [PATCH workqueue wq/for-3.19-fixes] workqueue: fix subtle pool management issue which can stall whole worker_pool

2015-01-18 Thread Lai Jiangshan
holds the pool-lock and no releasing form the beginning to here) My doubt might be wrong, but at least it is a good cleanup Acked-by: Lai Jiangshan la...@cn.fujitsu.com Thanks Lai restart: spin_unlock_irq(pool-lock); @@ -1877,7 +1871,6 @@ restart

Re: [RFC PATCH 0/2 shit_A shit_B] workqueue: fix wq_numa bug

2015-01-16 Thread Lai Jiangshan
, maybe you can do this at first: Make numa code maintain the mapping to the best of its knowledge and invoke notification callbacks when it changes. Thanks, Lai Thanks, Yasuaki Ishimatsu (2015/01/14 17:54), Lai Jiangshan wrote: Hi, All This patches are un-changloged, un-compiled, un-booted

Re: [PATCH 3.18 11/61] workqueue: fix subtle pool management issue which can stall whole worker_pool

2015-01-27 Thread Lai Jiangshan
the pool deadlock reliably without this patch. Signed-off-by: Tejun Heo t...@kernel.org Reported-by: Eric Sandeen sand...@sandeen.net Link: http://lkml.kernel.org/g/54b019f4.8030...@sandeen.net Cc: Dave Chinner da...@fromorbit.com Cc: Lai Jiangshan la...@cn.fujitsu.com Signed-off-by: Greg Kroah

Re: rcu, sched: WARNING: CPU: 30 PID: 23771 at kernel/rcu/tree_plugin.h:337 rcu_read_unlock_special+0x369/0x550()

2015-01-23 Thread Lai Jiangshan
On 01/23/2015 05:36 PM, Paul E. McKenney wrote: On Thu, Jan 22, 2015 at 10:55:42PM -0800, Paul E. McKenney wrote: On Thu, Jan 22, 2015 at 11:05:45PM -0500, Sasha Levin wrote: On 01/22/2015 11:02 PM, Sasha Levin wrote: On 01/22/2015 10:51 PM, Paul E. McKenney wrote: On Thu, Jan 22, 2015 at

Re: [RFC PATCH 0/2 shit_A shit_B] workqueue: fix wq_numa bug

2015-01-23 Thread Lai Jiangshan
On 01/23/2015 02:13 PM, Izumi, Taku/泉 拓 wrote: This patches are un-changloged, un-compiled, un-booted, un-tested, they are just shits, I even hope them un-sent or blocked. The patches include two -solutions-: Shit_A: workqueue: reset pool-node and unhash the pool when the node is

Re: rcu, sched: WARNING: CPU: 30 PID: 23771 at kernel/rcu/tree_plugin.h:337 rcu_read_unlock_special+0x369/0x550()

2015-01-23 Thread Lai Jiangshan
On 01/23/2015 02:55 PM, Paul E. McKenney wrote: On Thu, Jan 22, 2015 at 11:05:45PM -0500, Sasha Levin wrote: On 01/22/2015 11:02 PM, Sasha Levin wrote: On 01/22/2015 10:51 PM, Paul E. McKenney wrote: On Thu, Jan 22, 2015 at 10:29:01PM -0500, Sasha Levin wrote: On 01/21/2015 07:43 PM, Paul E.

Re: rcu, sched: WARNING: CPU: 30 PID: 23771 at kernel/rcu/tree_plugin.h:337 rcu_read_unlock_special+0x369/0x550()

2015-01-23 Thread Lai Jiangshan
On 01/23/2015 02:55 PM, Paul E. McKenney wrote: On Thu, Jan 22, 2015 at 11:05:45PM -0500, Sasha Levin wrote: On 01/22/2015 11:02 PM, Sasha Levin wrote: On 01/22/2015 10:51 PM, Paul E. McKenney wrote: On Thu, Jan 22, 2015 at 10:29:01PM -0500, Sasha Levin wrote: On 01/21/2015 07:43 PM, Paul E.

Re: [PATCH 3.18 11/61] workqueue: fix subtle pool management issue which can stall whole worker_pool

2015-01-27 Thread Lai Jiangshan
On 01/28/2015 10:24 AM, Tejun Heo wrote: On Wed, Jan 28, 2015 at 09:51:54AM +0800, Lai Jiangshan wrote: On 01/28/2015 09:26 AM, Greg Kroah-Hartman wrote: 3.18-stable review patch. If anyone has any objections, please let me know. I don't think it is a bug-fix. It is just a good cleanup

Re: [PATCH 1/2] workqueue: update numa affinity info at node hotplug

2015-01-13 Thread Lai Jiangshan
On 01/13/2015 11:22 PM, Tejun Heo wrote: Hello, On Tue, Jan 13, 2015 at 03:19:09PM +0800, Lai Jiangshan wrote: The Mapping of the *online* cpus to nodes is already maintained by numa code. What the workqueue needs is a special Mapping: The Mapping of the *possible* cpus to nodes

[RFC PATCH 2/2 shit_A] workqueue: update wq_numa when cpu_present_mask changed

2015-01-14 Thread Lai Jiangshan
Reported-by: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com Cc: Tejun Heo t...@kernel.org Cc: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com Cc: Gu, Zheng guz.f...@cn.fujitsu.com Cc: tangchen tangc...@cn.fujitsu.com Cc: Hiroyuki KAMEZAWA kamezawa.hir...@jp.fujitsu.com Signed-off-by: Lai

[RFC PATCH 0/2 shit_A shit_B] workqueue: fix wq_numa bug

2015-01-14 Thread Lai Jiangshan
Hi, All This patches are un-changloged, un-compiled, un-booted, un-tested, they are just shits, I even hope them un-sent or blocked. The patches include two -solutions-: Shit_A: workqueue: reset pool-node and unhash the pool when the node is offline update wq_numa when cpu_present_mask

[RFC PATCH 3/3 shit_B] workqueue: directly update attrs of pools when cpu hot[un]plug

2015-01-14 Thread Lai Jiangshan
, Zheng guz.f...@cn.fujitsu.com Cc: tangchen tangc...@cn.fujitsu.com Cc: Hiroyuki KAMEZAWA kamezawa.hir...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel/workqueue.c | 71 -- 1 file changed, 69 insertions(+), 2 deletions

[RFC PATCH 1/2 shit_A shit_B] workqueue: reset pool-node and unhash the pool when the node is offline

2015-01-14 Thread Lai Jiangshan
Reported-by: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com Cc: Tejun Heo t...@kernel.org Cc: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com Cc: Gu, Zheng guz.f...@cn.fujitsu.com Cc: tangchen tangc...@cn.fujitsu.com Cc: Hiroyuki KAMEZAWA kamezawa.hir...@jp.fujitsu.com Signed-off-by: Lai

[RFC PATCH 2/3 shit_B] workqueue: remove wq_numa_possible_cpumask

2015-01-14 Thread Lai Jiangshan
Ishimatsu isimatu.yasu...@jp.fujitsu.com Cc: Tejun Heo t...@kernel.org Cc: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com Cc: Gu, Zheng guz.f...@cn.fujitsu.com Cc: tangchen tangc...@cn.fujitsu.com Cc: Hiroyuki KAMEZAWA kamezawa.hir...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com

Re: [PATCH 1/2] workqueue: update numa affinity info at node hotplug

2015-01-12 Thread Lai Jiangshan
On 12/26/2014 04:11 AM, Tejun Heo wrote: On Wed, Dec 17, 2014 at 01:56:29PM +0900, Kamezawa Hiroyuki wrote: Let me correct my words. Main purpose of this patch 1/2 is handling a case node disappers after boot. And try to handle physicall node hotplug caes. Changes of cpu-node relationship

Re: [PATCH 3/5] workqueue: fixup existing pool-node

2015-01-12 Thread Lai Jiangshan
On 12/26/2014 04:14 AM, Tejun Heo wrote: On Mon, Dec 15, 2014 at 09:23:49AM +0800, Lai Jiangshan wrote: The pwqs of the old node's cpumask do be discarded. But the pools of the old node's cpumask maybe recycle. For example, a new workqueue's affinity is set to the old node's cpumask before

[PATCH] rcu_tree: avoid touch rnp-completed when starts a new GP

2015-01-12 Thread Lai Jiangshan
In rcu_gp_init(), rnp-completed equals to rsp-completed in THEORY, we don't need to touch it normally. If something goes wrong, it will complain and fixup rnp-completed and avoid oops. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel/rcu/tree.c | 4 ++-- 1 file changed, 2 insertions

[PATCH 2/4 V5] workqueue: split apply_workqueue_attrs() into 3 stages

2015-03-17 Thread Lai Jiangshan
into wq_pool_mutex. this is needed to avoid to do the further splitting. Suggested-by: Tejun Heo t...@kernel.org Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc: Paul E. McKenney paul

[PATCH 3/4 V5] workqueue: Create low-level unbound workqueues cpumask

2015-03-17 Thread Lai Jiangshan
to cpu_possible_mask. Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Tejun Heo t...@kernel.org Cc: Viresh Kumar viresh.ku...@linaro.org Signed-off

[PATCH 0/4 V5] workqueue: Introduce low-level unbound wq sysfs cpumask v5

2015-03-17 Thread Lai Jiangshan
will be repose after this patchset accepted. Changed from V4 Add workqueue_unbounds_cpumask_set() kernel API and minimally restruct the patch4. Thanks, Lai Frederic Weisbecker (2): workqueue: Reorder sysfs code workqueue: Create low-level unbound workqueues cpumask Lai Jiangshan (2): workqueue

[PATCH 4/4 V5] workqueue: Allow modifying low level unbound workqueue cpumask

2015-03-17 Thread Lai Jiangshan
, the system manager or other subsystem which knows the sufficient information should set it when needed. Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc: Paul E. McKenney paul

[PATCH 1/4 V5] workqueue: Reorder sysfs code

2015-03-17 Thread Lai Jiangshan
apply_workqueue_attrs(). Lets move that block further in the file, right above alloc_workqueue_key() which reference it. Suggested-by: Tejun Heo t...@kernel.org Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc

Re: [PATCH 3/4] workqueue: Create low-level unbound workqueues cpumask

2015-03-14 Thread Lai Jiangshan
On 03/14/2015 07:49 AM, Kevin Hilman wrote: Lai Jiangshan la...@cn.fujitsu.com writes: From: Frederic Weisbecker fweis...@gmail.com Create a cpumask that limit the affinity of all unbound workqueues. This cpumask is controlled though a file at the root of the workqueue sysfs directory

Re: [PATCH 4/4] workqueue: Allow modifying low level unbound workqueue cpumask

2015-03-13 Thread Lai Jiangshan
On 03/12/2015 01:00 PM, Lai Jiangshan wrote: Allow to modify the low-level unbound workqueues cpumask through sysfs. This is performed by traversing the entire workqueue list and calling wq_unbound_install_ctx_prepare() on the unbound workqueues with the low level mask passed in. Only after

Re: [PATCH 4/4] workqueue: Allow modifying low level unbound workqueue cpumask

2015-03-12 Thread Lai Jiangshan
On 03/13/2015 01:42 AM, Christoph Lameter wrote: On Thu, 12 Mar 2015, Lai Jiangshan wrote: The per-nodes' pwqs are mandatorily controlled by the low level cpumask, while the default pwq ignores the low level cpumask when (and ONLY when) the cpumask set by the user doesn't overlap

[PATCH 0/4] workqueue: Introduce low-level unbound wq sysfs cpumask v4

2015-03-11 Thread Lai Jiangshan
after this patchset accepted. Thanks, Lai Frederic Weisbecker (2): workqueue: Reorder sysfs code workqueue: Create low-level unbound workqueues cpumask Lai Jiangshan (2): workqueue: split apply_workqueue_attrs() into 3 stages workqueue: Allow modifying low level unbound workqueue cpumask Cc

[PATCH 1/4] workqueue: Reorder sysfs code

2015-03-11 Thread Lai Jiangshan
apply_workqueue_attrs(). Lets move that block further in the file, right above alloc_workqueue_key() which reference it. Suggested-by: Tejun Heo t...@kernel.org Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc

[PATCH 4/4] workqueue: Allow modifying low level unbound workqueue cpumask

2015-03-11 Thread Lai Jiangshan
doesn't overlap with the low level cpumask. In this case, we can't apply the empty cpumask to the default pwq, so we use the user-set cpumask directly. Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de

[PATCH 2/4] workqueue: split apply_workqueue_attrs() into 3 stages

2015-03-11 Thread Lai Jiangshan
into wq_pool_mutex. this is needed to avoid to do the further splitting. Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Tejun Heo t...@kernel.org

[PATCH 3/4] workqueue: Create low-level unbound workqueues cpumask

2015-03-11 Thread Lai Jiangshan
to cpu_possible_mask. Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Tejun Heo t...@kernel.org Cc: Viresh Kumar viresh.ku...@linaro.org Signed-off

Re: [PATCH 4/4 V5] workqueue: Allow modifying low level unbound workqueue cpumask

2015-03-31 Thread Lai Jiangshan
On 03/25/2015 01:31 AM, Tejun Heo wrote: On Wed, Mar 18, 2015 at 12:40:17PM +0800, Lai Jiangshan wrote: The oreder-workquue is ignore from the low level unbound workqueue cpumask, it will be handled in near future. Ugh, right, ordered workqueues are tricky. Maybe we should change how

Re: [PATCH 4/4 V5] workqueue: Allow modifying low level unbound workqueue cpumask

2015-04-01 Thread Lai Jiangshan
may need to be reallocated during the cpuhotplug-add/remove and it means wq_update_unbound_numa() can fail. Frederic, TJ, any comments about this case? TJ, would you like to make wq_update_unbound_numa() be failure-able? thanks Lai On 03/31/2015 03:46 PM, Lai Jiangshan wrote: On 03/25/2015 01:31

[PATCH] sched,nohz: fallback to housekeeping cpus before fallback to possible cpus

2015-04-01 Thread Lai Jiangshan
viresh.ku...@linaro.org Cc: Frederic Weisbecker fweis...@gmail.com Cc: Ingo Molnar mi...@kernel.org Cc: Peter Zijlstra pet...@infradead.org Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel/sched/core.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kernel

Re: rcu, sched: WARNING: CPU: 30 PID: 23771 at kernel/rcu/tree_plugin.h:337 rcu_read_unlock_special+0x369/0x550()

2015-01-25 Thread Lai Jiangshan
On 01/25/2015 05:18 AM, Paul E. McKenney wrote: Good point! In my scenario, CPU 0 would not yet have switched away from Task A. Hmmm... Yet Sasha really does see this failure. Will give it some more thought. Any ideas? I don't known which commit was merged from the rcu-git-tree in

[PATCH 0/4 V6] workqueue: Introduce low-level unbound wq sysfs cpumask v5

2015-04-02 Thread Lai Jiangshan
() kernel API and minimally restruct the patch4. Cc: Tejun Heo t...@kernel.org Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Tejun Heo t

[PATCH 1/4 V6] workqueue: Reorder sysfs code

2015-04-02 Thread Lai Jiangshan
apply_workqueue_attrs(). Lets move that block further in the file, almost the botom. And declare workqueue_sysfs_unregister() just before destroy_workqueue() which reference it. Suggested-by: Tejun Heo t...@kernel.org Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la

[PATCH 3/4 V6] workqueue: Create low-level unbound workqueues cpumask

2015-04-02 Thread Lai Jiangshan
to cpu_possible_mask. Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Tejun Heo t...@kernel.org Cc: Viresh Kumar viresh.ku...@linaro.org Signed-off

[PATCH 4/4 V6] workqueue: Allow modifying low level unbound workqueue cpumask

2015-04-02 Thread Lai Jiangshan
needed. Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Tejun Heo t...@kernel.org Cc: Viresh Kumar viresh.ku...@linaro.org Cc: Frederic Weisbecker

[PATCH 2/4 V6] workqueue: split apply_workqueue_attrs() into 3 stages

2015-04-02 Thread Lai Jiangshan
into wq_pool_mutex. this is needed to avoid to do the further splitting. Suggested-by: Tejun Heo t...@kernel.org Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc: Paul E. McKenney paul

Re: [PATCH 1/3 V7] workqueue: split apply_workqueue_attrs() into 3 stages

2015-04-19 Thread Lai Jiangshan
On 04/17/2015 10:57 PM, Tejun Heo wrote: On Tue, Apr 07, 2015 at 07:26:35PM +0800, Lai Jiangshan wrote: Current apply_workqueue_attrs() includes pwqs-allocation and pwqs-installation, so when we batch multiple apply_workqueue_attrs()s as a transaction, we can't ensure the transaction must

[PATCH V9] workqueue: Allow modifying low level unbound workqueue cpumask

2015-04-30 Thread Lai Jiangshan
the comment of workqueue_set_unbound_cpumask(); Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Tejun Heo t...@kernel.org Cc: Viresh Kumar

Re: [PATCH 3/3 V8] workqueue: Allow modifying low level unbound workqueue cpumask

2015-04-30 Thread Lai Jiangshan
On 04/28/2015 06:16 PM, Lai Jiangshan wrote: On 04/28/2015 11:49 AM, Tejun Heo wrote: Hello, On Tue, Apr 28, 2015 at 10:24:31AM +0800, Lai Jiangshan wrote: Wouldn't this make a lot more sense above when copying @attrs into @new_attrs? The comment there even says make a copy of @attrs

[PATCH 0/3 V8] workqueue: Introduce low-level unbound wq sysfs cpumask

2015-04-27 Thread Lai Jiangshan
to calculate the per-nodes' attrs and avoid introducing any branch or special handling. Frederic Weisbecker (1): workqueue: Create low-level unbound workqueues cpumask Lai Jiangshan (2): workqueue: split apply_workqueue_attrs() into 3 stages workqueue: Allow modifying low level unbound workqueue

[PATCH 1/3 V8] workqueue: split apply_workqueue_attrs() into 3 stages

2015-04-27 Thread Lai Jiangshan
into wq_pool_mutex. this is needed to avoid to do the further splitting. Suggested-by: Tejun Heo t...@kernel.org Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc: Paul E. McKenney paul

[PATCH 3/3 V8] workqueue: Allow modifying low level unbound workqueue cpumask

2015-04-27 Thread Lai Jiangshan
Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Tejun Heo t...@kernel.org Cc: Viresh Kumar viresh.ku...@linaro.org Cc: Frederic Weisbecker fweis...@gmail.com

[PATCH 2/3 V8] workqueue: Create low-level unbound workqueues cpumask

2015-04-27 Thread Lai Jiangshan
to cpu_possible_mask. Cc: Christoph Lameter c...@linux.com Cc: Kevin Hilman khil...@linaro.org Cc: Lai Jiangshan la...@cn.fujitsu.com Cc: Mike Galbraith bitbuc...@online.de Cc: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Tejun Heo t...@kernel.org Cc: Viresh Kumar viresh.ku...@linaro.org Signed-off

Re: [PATCH 3/3 V8] workqueue: Allow modifying low level unbound workqueue cpumask

2015-04-27 Thread Lai Jiangshan
Hello --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -424,6 +424,7 @@ struct workqueue_attrs *alloc_workqueue_attrs(gfp_t gfp_mask); void free_workqueue_attrs(struct workqueue_attrs *attrs); int apply_workqueue_attrs(struct workqueue_struct *wq,

Re: [PATCH 3/3 V8] workqueue: Allow modifying low level unbound workqueue cpumask

2015-04-27 Thread Lai Jiangshan
On 04/28/2015 09:44 AM, Lai Jiangshan wrote: + /* save the user configured attrs */ + cpumask_and(new_attrs-cpumask, attrs-cpumask, cpu_possible_mask); Wouldn't this make a lot more sense above when copying @attrs into @new_attrs? The comment there even says make a copy of @attrs

Re: [PATCH 3/3 V8] workqueue: Allow modifying low level unbound workqueue cpumask

2015-04-28 Thread Lai Jiangshan
On 04/28/2015 11:49 AM, Tejun Heo wrote: Hello, On Tue, Apr 28, 2015 at 10:24:31AM +0800, Lai Jiangshan wrote: Wouldn't this make a lot more sense above when copying @attrs into @new_attrs? The comment there even says make a copy of @attrs and sanitize it. Copy to @new_attrs, mask

Re: [PATCH 3/3 V8] workqueue: Allow modifying low level unbound workqueue cpumask

2015-04-28 Thread Lai Jiangshan
On 04/28/2015 12:36 PM, Mike Galbraith wrote: On Mon, 2015-04-27 at 23:44 -0400, Tejun Heo wrote: So, we need an API to modify the wq_unbound_cpumask, and I provided this public function. Otherwise, the other code can't modify it. I see. I don't have too strong an opinion; however,

[PATCH 0/5] workqueue: cleanup for apply_workqueue_attrs()

2015-05-11 Thread Lai Jiangshan
...@kernel.org Lai Jiangshan (5): workqueue: wq_pool_mutex protects the attrs-installation workqueue: merge the similar code workqueue: ensure attrs-changing be sequentially workqueue: don't expose workqueue_attrs to users workqueue: remove no_numa from workqueue_attrs include/linux/workqueue.h

[PATCH 5/5] workqueue: remove no_numa from workqueue_attrs

2015-05-11 Thread Lai Jiangshan
affinity is stored at wq-numa instead. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel/workqueue.c | 44 ++-- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index b08df98..42721a2 100644

[PATCH 2/5] workqueue: merge the similar code

2015-05-11 Thread Lai Jiangshan
(). Changed behavior: 1) Always try to reuse the old pwq. (In old code, apply_workqueue_attrs() doesn't resue the old pwq. 2) Any reusage of old pwq will introduce get_pwq()/put_pwq() and corresponding lock overhead. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com

[PATCH 1/5] workqueue: wq_pool_mutex protects the attrs-installation

2015-05-11 Thread Lai Jiangshan
is in apply_workqueue_attrs(), so this patch touches code less than comments. It is also a preparation patch of merging similar code in apply_workqueue_attrs() and wq_update_unbound_numa() together. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel/workqueue.c | 44

[PATCH 4/5] workqueue: don't expose workqueue_attrs to users

2015-05-11 Thread Lai Jiangshan
with the protection of apply_wqattrs_lock(); This patch is also a preparation patch of next patch which remove no_numa out from the structure workqueue_attrs which requires apply_workqueue_attrs() has an argument to pass numa affinity. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- include/linux

[PATCH 3/5] workqueue: ensure attrs-changing be sequentially

2015-05-11 Thread Lai Jiangshan
wq_pool_mutex to ensure attrs-changing be sequentially. This patch is also a preparation patch for next patch which change the API of apply_workqueue_attrs(). Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- kernel/workqueue.c | 110 + 1 file

Re: [PATCH 3/5] workqueue: ensure attrs-changing be sequentially

2015-05-11 Thread Lai Jiangshan
On 05/11/2015 10:55 PM, Tejun Heo wrote: Hey, Prolly a better subject is ensure attrs changes are properly synchronized On Mon, May 11, 2015 at 05:35:50PM +0800, Lai Jiangshan wrote: Current modification to attrs via sysfs is not atomically

Re: [PATCH 4/5] workqueue: don't expose workqueue_attrs to users

2015-05-11 Thread Lai Jiangshan
On 05/11/2015 10:59 PM, Tejun Heo wrote: On Mon, May 11, 2015 at 05:35:51PM +0800, Lai Jiangshan wrote: workqueue_attrs is an internal-like structure and is exposed with apply_workqueue_attrs() whose user has to investigate the structure before use. And the apply_workqueue_attrs() API

Re: [PATCH 2/5] workqueue: merge the similar code

2015-05-11 Thread Lai Jiangshan
On 05/11/2015 10:31 PM, Tejun Heo wrote: Hello, Lai. Hello, TJ * @node: the target NUMA node - * @cpu_going_down: if = 0, the CPU to consider as offline - * @cpumask: outarg, the resulting cpumask + * @cpu_off: if = 0, the CPU to consider as offline @cpu_off sounds like offset into

Re: [PATCH 4/5] workqueue: don't expose workqueue_attrs to users

2015-05-12 Thread Lai Jiangshan
On 05/12/2015 09:22 PM, Tejun Heo wrote: Hello, Lai. On Tue, May 12, 2015 at 10:15:28AM +0800, Lai Jiangshan wrote: I'm not sure about this. Yeah, sure, it's a bit more lines of code but at the same time this'd allow us to make the public interface atomic too. What we prolly should do

Re: [PATCH 0/7 V2] workqueue: cleanup for attr management

2015-05-17 Thread Lai Jiangshan
On 05/18/2015 09:26 AM, Tejun Heo wrote: On Mon, May 18, 2015 at 08:39:21AM +0800, Lai Jiangshan wrote: ping Does this reflect the comments from the previous review cycle? This is the V2 version of the V1 pathset. But it is just the updated version of the patch12 of the V1 patchset

<    4   5   6   7   8   9   10   11   12   13   >