lkml.org 
[lkml]   [2016]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU
On Thu, Jun 16, 2016 at 02:45:48PM +0200, Peter Zijlstra wrote:
> Subject: workqueue: Fix setting affinity of unbound worker threads
> From: Peter Zijlstra <peterz@infradead.org>
> Date: Thu Jun 16 14:38:42 CEST 2016
>
> With commit e9d867a67fd03ccc ("sched: Allow per-cpu kernel threads to
> run on online && !active"), __set_cpus_allowed_ptr() expects that only
> strict per-cpu kernel threads can have affinity to an online CPU which
> is not yet active.
>
> This assumption is currently broken in the CPU_ONLINE notification
> handler for the workqueues where restore_unbound_workers_cpumask()
> calls set_cpus_allowed_ptr() when the first cpu in the unbound
> worker's pool->attr->cpumask comes online. Since
> set_cpus_allowed_ptr() is called with pool->attr->cpumask in which
> only one CPU is online which is not yet active, we get the following
> WARN_ON during an CPU online operation.

Applied to wq/for-4.7-fixes.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2016-06-16 22:21    [W:0.084 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site