From: Peter Zijlstra <peterz@infradead.org>
To: Sasha Levin <sasha.levin@oracle.com>
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
Date: Thu, 13 Aug 2015 22:37:32 +0200 [thread overview]
Message-ID: <20150813203732.GF16853@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <55CCE638.3030907@oracle.com>
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
next prev parent reply other threads:[~2015-08-13 20:37 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 15:43 [RFC][PATCH 0/4] sched,numa: pinned task accounting Peter Zijlstra
2015-05-15 15:43 ` [RFC][PATCH 1/4] sched: Fix a race between __kthread_bind() and sched_setaffinity() Peter Zijlstra
2015-05-15 15:56 ` Tejun Heo
2015-08-07 14:27 ` Peter Zijlstra
2015-08-07 15:16 ` Tejun Heo
2015-08-07 15:29 ` Peter Zijlstra
2015-08-07 15:38 ` Tejun Heo
2015-08-07 15:59 ` Peter Zijlstra
2015-08-07 16:09 ` Tejun Heo
2015-08-12 12:38 ` [tip:sched/core] " tip-bot for Peter Zijlstra
2015-05-15 15:43 ` [RFC][PATCH 2/4] sched: Make sched_class::set_cpus_allowed() unconditional Peter Zijlstra
2015-08-12 12:38 ` [tip:sched/core] " tip-bot for Peter Zijlstra
2015-08-20 16:45 ` [RFC][PATCH 2/4] " Sasha Levin
2015-05-15 15:43 ` [RFC][PATCH 3/4] sched: Change sched_class::set_cpus_allowed calling context Peter Zijlstra
[not found] ` <OF66BF3765.2EBFD3B1-ON48257E49.0028DC79-48257E49.0029F058@zte.com.cn>
2015-05-18 8:32 ` Peter Zijlstra
2015-05-18 9:34 ` Juri Lelli
2015-05-18 20:04 ` Peter Zijlstra
2015-08-12 12:38 ` [tip:sched/core] sched: Change the sched_class::set_cpus_allowed( ) " tip-bot for Peter Zijlstra
2015-08-13 18:47 ` Sasha Levin
2015-08-13 20:37 ` Peter Zijlstra [this message]
2015-08-13 20:59 ` Sasha Levin
2015-08-13 21:30 ` Peter Zijlstra
2015-05-15 15:43 ` [RFC][PATCH 4/4] sched, numa: Ignore pinned tasks Peter Zijlstra
2015-05-15 19:05 ` Rik van Riel
2015-05-16 9:31 ` Peter Zijlstra
2015-05-18 13:00 ` Srikar Dronamraju
2015-05-18 13:06 ` Peter Zijlstra
2015-05-18 14:13 ` Rik van Riel
2015-05-18 14:29 ` Srikar Dronamraju
2015-05-18 15:09 ` Peter Zijlstra
2015-05-18 13:10 ` Srikar Dronamraju
2015-05-18 9:08 ` [RFC][PATCH 0/4] sched,numa: pinned task accounting Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150813203732.GF16853@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=efault@gmx.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=sasha.levin@oracle.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome