...@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
...@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
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
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
: 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
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
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
[ 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
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
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
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
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
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
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
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
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
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
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.
);
}
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
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
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
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
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.
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
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.
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
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.
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
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
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
()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
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
===
---
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
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
-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
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());
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
:
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
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
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
, 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
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
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
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
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.
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.
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
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
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
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
, 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
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
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
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
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
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
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
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
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
, 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
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
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
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
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
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
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
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
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
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
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
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
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
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
() 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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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,
...@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
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
().
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
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
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
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
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
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
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
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
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
801 - 900 of 2229 matches
Mail list logo