* linux-next: build failure after merge of the workqueues tree
@ 2017-11-02 3:34 Stephen Rothwell
2017-11-03 13:59 ` Tejun Heo
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2017-11-02 3:34 UTC (permalink / raw)
To: Tejun Heo, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Tal Shorer,
Frederic Weisbecker
Hi Tejun,
After merging the workqueues tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
kernel/workqueue.c: In function 'workqueue_init_early':
kernel/workqueue.c:5561:56: error: 'cpu_isolated_map' undeclared (first use in this function)
cpumask_andnot(wq_unbound_cpumask, cpu_possible_mask, cpu_isolated_map);
^
Caused by commit
b5149873a0c2 ("workqueue: respect isolated cpus when queueing an unbound work")
interacting with commit
edb9382175c3 ("sched/isolation: Move isolcpus= handling to the housekeeping code")
from the tip tree.
I am not sure how to fix this, so I have reverted b5149873a0c2 for today.
--
Cheers,
Stephen Rothwell
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: build failure after merge of the workqueues tree
2017-11-02 3:34 linux-next: build failure after merge of the workqueues tree Stephen Rothwell
@ 2017-11-03 13:59 ` Tejun Heo
2017-11-03 15:27 ` [PATCH v3 1/2] main: kernel_start: move housekeeping_init() before workqueue_init_early() Tal Shorer
0 siblings, 1 reply; 6+ messages in thread
From: Tejun Heo @ 2017-11-03 13:59 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
Linux-Next Mailing List, Linux Kernel Mailing List, Tal Shorer,
Frederic Weisbecker
On Thu, Nov 02, 2017 at 02:34:40PM +1100, Stephen Rothwell wrote:
> Hi Tejun,
>
> After merging the workqueues tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
>
> kernel/workqueue.c: In function 'workqueue_init_early':
> kernel/workqueue.c:5561:56: error: 'cpu_isolated_map' undeclared (first use in this function)
> cpumask_andnot(wq_unbound_cpumask, cpu_possible_mask, cpu_isolated_map);
> ^
>
> Caused by commit
>
> b5149873a0c2 ("workqueue: respect isolated cpus when queueing an unbound work")
>
> interacting with commit
>
> edb9382175c3 ("sched/isolation: Move isolcpus= handling to the housekeeping code")
>
> from the tip tree.
>
> I am not sure how to fix this, so I have reverted b5149873a0c2 for today.
I'm reverting it from my tree. Tal, can you please spin up a new
patch against the sched branch? Let's either route it through sched
branch or try again after the rc1.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 1/2] main: kernel_start: move housekeeping_init() before workqueue_init_early()
2017-11-03 13:59 ` Tejun Heo
@ 2017-11-03 15:27 ` Tal Shorer
2017-11-03 15:27 ` [PATCH v3 2/2] workqueue: respect isolated cpus when queueing an unbound work Tal Shorer
0 siblings, 1 reply; 6+ messages in thread
From: Tal Shorer @ 2017-11-03 15:27 UTC (permalink / raw)
To: tj
Cc: sfr, tglx, mingo, hpa, peterz, linux-next, linux-kernel,
tal.shorer, frederic
This is needed in order to allow the unbound workqueue to take
housekeeping cpus into accounty
Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
---
init/main.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/init/main.c b/init/main.c
index 4610c99..af6ecd0 100644
--- a/init/main.c
+++ b/init/main.c
@@ -591,6 +591,12 @@ asmlinkage __visible void __init start_kernel(void)
radix_tree_init();
/*
+ * Set up housekeeping before setting up workqueues to allow the unbound
+ * workqueue to take non-housekeeping into account.
+ */
+ housekeeping_init();
+
+ /*
* Allow workqueue creation and work item queueing/cancelling
* early. Work item execution depends on kthreads and starts after
* workqueue_init().
@@ -607,7 +613,6 @@ asmlinkage __visible void __init start_kernel(void)
early_irq_init();
init_IRQ();
tick_init();
- housekeeping_init();
rcu_init_nohz();
init_timers();
hrtimers_init();
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 2/2] workqueue: respect isolated cpus when queueing an unbound work
2017-11-03 15:27 ` [PATCH v3 1/2] main: kernel_start: move housekeeping_init() before workqueue_init_early() Tal Shorer
@ 2017-11-03 15:27 ` Tal Shorer
2017-11-06 15:26 ` Tejun Heo
2017-11-27 16:57 ` Tejun Heo
0 siblings, 2 replies; 6+ messages in thread
From: Tal Shorer @ 2017-11-03 15:27 UTC (permalink / raw)
To: tj
Cc: sfr, tglx, mingo, hpa, peterz, linux-next, linux-kernel,
tal.shorer, frederic
Initialize wq_unbound_cpumask to exclude cpus that were isolated by
the cmdline's isolcpus parameter.
Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
---
kernel/workqueue.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 64d0edf..a355e9d 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -48,6 +48,7 @@
#include <linux/nodemask.h>
#include <linux/moduleparam.h>
#include <linux/uaccess.h>
+#include <linux/sched/isolation.h>
#include "workqueue_internal.h"
@@ -4980,6 +4981,10 @@ int workqueue_set_unbound_cpumask(cpumask_var_t cpumask)
if (!zalloc_cpumask_var(&saved_cpumask, GFP_KERNEL))
return -ENOMEM;
+ /*
+ * Not excluding isolated cpus on purpose.
+ * If the user wishes to include them, we allow that.
+ */
cpumask_and(cpumask, cpumask, cpu_possible_mask);
if (!cpumask_empty(cpumask)) {
apply_wqattrs_lock();
@@ -5579,7 +5584,7 @@ int __init workqueue_init_early(void)
WARN_ON(__alignof__(struct pool_workqueue) < __alignof__(long long));
BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL));
- cpumask_copy(wq_unbound_cpumask, cpu_possible_mask);
+ cpumask_copy(wq_unbound_cpumask, housekeeping_cpumask(HK_FLAG_DOMAIN));
pwq_cache = KMEM_CACHE(pool_workqueue, SLAB_PANIC);
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/2] workqueue: respect isolated cpus when queueing an unbound work
2017-11-03 15:27 ` [PATCH v3 2/2] workqueue: respect isolated cpus when queueing an unbound work Tal Shorer
@ 2017-11-06 15:26 ` Tejun Heo
2017-11-27 16:57 ` Tejun Heo
1 sibling, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2017-11-06 15:26 UTC (permalink / raw)
To: Tal Shorer
Cc: sfr, tglx, mingo, hpa, peterz, linux-next, linux-kernel, frederic
On Fri, Nov 03, 2017 at 05:27:50PM +0200, Tal Shorer wrote:
> Initialize wq_unbound_cpumask to exclude cpus that were isolated by
> the cmdline's isolcpus parameter.
>
> Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Plese feel free to route with the prerequisite changes. If not, I'll
apply them after the next -rc1 window.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/2] workqueue: respect isolated cpus when queueing an unbound work
2017-11-03 15:27 ` [PATCH v3 2/2] workqueue: respect isolated cpus when queueing an unbound work Tal Shorer
2017-11-06 15:26 ` Tejun Heo
@ 2017-11-27 16:57 ` Tejun Heo
1 sibling, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2017-11-27 16:57 UTC (permalink / raw)
To: Tal Shorer
Cc: sfr, tglx, mingo, hpa, peterz, linux-next, linux-kernel, frederic
On Fri, Nov 03, 2017 at 05:27:50PM +0200, Tal Shorer wrote:
> Initialize wq_unbound_cpumask to exclude cpus that were isolated by
> the cmdline's isolcpus parameter.
>
> Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
Applied 1-2 to wq/for-4.15-fixes.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-11-27 16:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-02 3:34 linux-next: build failure after merge of the workqueues tree Stephen Rothwell
2017-11-03 13:59 ` Tejun Heo
2017-11-03 15:27 ` [PATCH v3 1/2] main: kernel_start: move housekeeping_init() before workqueue_init_early() Tal Shorer
2017-11-03 15:27 ` [PATCH v3 2/2] workqueue: respect isolated cpus when queueing an unbound work Tal Shorer
2017-11-06 15:26 ` Tejun Heo
2017-11-27 16:57 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).