From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756978AbcG0PZZ (ORCPT ); Wed, 27 Jul 2016 11:25:25 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:46556 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753276AbcG0PZY (ORCPT ); Wed, 27 Jul 2016 11:25:24 -0400 Date: Wed, 27 Jul 2016 17:23:05 +0200 (CEST) From: Thomas Gleixner To: Heiko Carstens cc: Peter Zijlstra , LKML , Tejun Heo Subject: Re: [bisected] "sched: Allow per-cpu kernel threads to run on online && !active" causes warning In-Reply-To: <20160727125412.GB3912@osiris> Message-ID: References: <20160727125412.GB3912@osiris> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 27 Jul 2016, Heiko Carstens wrote: > [ 3.162961] ([<0000000000176c30>] select_task_rq+0xc0/0x1a8) > [ 3.162963] ([<0000000000177d64>] try_to_wake_up+0x2e4/0x478) > [ 3.162968] ([<000000000015d46c>] create_worker+0x174/0x1c0) > [ 3.162971] ([<0000000000161a98>] alloc_unbound_pwq+0x360/0x438) > For some unknown reason select_task_rq() gets called with a task that has > nr_cpus_allowed == 0. Hence "cpu = cpumask_any(tsk_cpus_allowed(p));" > within select_task_rq() will set cpu to nr_cpu_ids which in turn causes the > warning later on. > > It only happens with more than one node, otherwise it seems to work fine. > > Any idea what could be wrong here? create_worker() tsk = kthread_create_on_node(); kthread_bind_mask(tsk, pool->attrs->cpumask); do_set_cpus_allowed(tsk, mask); set_cpus_allowed_common(tsk, mask); cpumask_copy(&tsk->cpus_allowed, mask); tsk->nr_cpus_allowed = cpumask_weight(mask); wake_up_process(task); So this looks like pool->attrs->cpumask is simply empty..... Thanks, tglx