From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932118AbcGOF1p (ORCPT ); Fri, 15 Jul 2016 01:27:45 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56383 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750884AbcGOF1m (ORCPT ); Fri, 15 Jul 2016 01:27:42 -0400 X-IBM-Helo: d01dlp03.pok.ibm.com X-IBM-MailFrom: ego@linux.vnet.ibm.com Date: Fri, 15 Jul 2016 10:57:28 +0530 From: Gautham R Shenoy To: Tejun Heo Cc: Peter Zijlstra , Michael Ellerman , Gautham R Shenoy , Thomas Gleixner , Abdul Haleem , Aneesh Kumar , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU Reply-To: ego@linux.vnet.ibm.com References: <20160614112234.GF30154@twins.programming.kicks-ass.net> <20160615101936.GA31671@in.ibm.com> <20160615113249.GH30909@twins.programming.kicks-ass.net> <20160615125033.GB31671@in.ibm.com> <20160615131415.GI30909@twins.programming.kicks-ass.net> <20160615160112.GC24102@mtj.duckdns.org> <1466079084.19127.2.camel@ellerman.id.au> <20160616124548.GE30921@twins.programming.kicks-ass.net> <20160616193905.GC3262@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160616193905.GC3262@mtj.duckdns.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16071505-0040-0000-0000-000000D043DD X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16071505-0041-0000-0000-000004AA7897 Message-Id: <20160715052728.GA5072@in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-07-15_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1607150062 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tejun, On Thu, Jun 16, 2016 at 03:39:05PM -0400, Tejun Heo wrote: > 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 > > 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. Did this patch get missed by any chance? It is not in the master branch of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git yet. We're still hitting the WARN_ON() during boot-up on the mainline kernel. > Thanks. > > -- > tejun > -- Thanks and Regards gautham.