Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753564AbbHMUhj (ORCPT ); Thu, 13 Aug 2015 16:37:39 -0400 Received: from casper.infradead.org ([85.118.1.10]:60155 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752022AbbHMUhi (ORCPT ); Thu, 13 Aug 2015 16:37:38 -0400 Date: Thu, 13 Aug 2015 22:37:32 +0200 From: Peter Zijlstra To: Sasha Levin Cc: hpa@zytor.com, torvalds@linux-foundation.org, efault@gmx.de, tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, linux-tip-commits@vger.kernel.org Subject: Re: [tip:sched/core] sched: Change the sched_class::set_cpus_allowed( ) calling context Message-ID: <20150813203732.GF16853@twins.programming.kicks-ass.net> References: <20150515154833.667516139@infradead.org> <55CCE638.3030907@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55CCE638.3030907@oracle.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1881 Lines: 41 On Thu, Aug 13, 2015 at 02:47:20PM -0400, Sasha Levin wrote: > [79817.224383] bad: scheduling from the idle thread! > [79817.224900] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.2.0-rc6-next-20150813-sasha-00040-g059fd6d #2431 > [79817.225709] ffffffffae0c6320 ffff880051b77c00 ffffffffade7f739 ffff8800a69e15c0 > [79817.226419] ffff880051b77c18 ffffffffa43c4ed3 ffff880051be8000 ffff880051b77c48 > [79817.227122] ffffffffa43a7ffb ffff880051be8000 ffff8800a69e15c0 ffffffffae094d40 > [79817.227806] Call Trace: > [79817.228039] dump_stack (lib/dump_stack.c:52) > [79817.228503] dequeue_task_idle (kernel/sched/idle_task.c:45) > [79817.229005] dequeue_task (kernel/sched/core.c:839) > [79817.229485] do_set_cpus_allowed (kernel/sched/core.c:1178 (discriminator 9)) > [79817.230006] init_idle (kernel/sched/core.c:4937) > [79817.230467] idle_thread_get (kernel/smpboot.c:35) Dhurr.. so oddly enough my actual hardware boots without issue. But I can see how that could go wrong, does the below make your (virtual) machine happy again? --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 56aed8fce3cb..2d2871e2cf5d 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4924,7 +4924,7 @@ void init_idle(struct task_struct *idle, int cpu) idle->state = TASK_RUNNING; idle->se.exec_start = sched_clock(); - do_set_cpus_allowed(idle, cpumask_of(cpu)); + set_cpus_allowed_common(idle, cpumask_of(cpu)); /* * We're having a chicken and egg problem, even though we are * holding rq->lock, the cpu isn't yet set to this cpu so the -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/