From: Konrad Eisele <konrad@gaisler.com>
To: sparclinux@vger.kernel.org
Subject: Re: failing kthread_create_on_node()
Date: Thu, 19 Apr 2012 09:33:24 +0000 [thread overview]
Message-ID: <4F8FDBE4.10107@gaisler.com> (raw)
In-Reply-To: <4F8BED36.7000304@gaisler.com>
David Miller wrote:
> From: Konrad Eisele<konrad@gaisler.com>
> Date: Tue, 17 Apr 2012 08:37:50 +0200
>
>> 2. What happens next
>>
>> CPU1 will boot up and execute schedule().
>> ...
>> -> kernel/core.c:__schedule()
>
> The stop thread doesn't actually run immediately when it is created,
> so will need to be woken up to be scheduled and run.
>
> At wakeup time, set_task_cpu() should fix things up and make the
> task have a correct ->cpu in it's thread_info.
>
> I wonder if one of the sparc32 global cpu masks isn't being
> initialized properly.
> --
> To unsubscribe from this list: send the line "unsubscribe sparclinux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
I have posted
"[PATCH 1/1] sparc: task_cpu() for stopper thread on sparc32 returns 0"
I traced it further and you where right, the stop thread of CPU1 was
sleeping.
The reason that the stopper thread for cpu-1 gets inserted into runqueue-0
(which causes fatal failure later on) is traced below:
When CPU1 comes online it is woken up. Then I end up in
the following call path:
-> kernel/sched/core.c():try_to_wake_up():
...
1628: cpu = select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
1629: if (task_cpu(p) != cpu) {
...
-> kernel/sched/core.c:select_task_rq():
...
1332: int cpu = p->sched_class->select_task_rq(p, sd_flags, wake_flags);
...
-> kernel/sched/stop_task.c:select_task_rq_stop():
...
16: return task_cpu(p); /* stop tasks as never migrate */
...
however task_cpu(p) is 0.
The patch posted checks weather a different cpu should be returned in
kernel/sched/stop_task.c:select_task_rq_stop().
Hope that makes sense.
-- Konrad
next prev parent reply other threads:[~2012-04-19 9:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-16 9:58 failing kthread_create_on_node() Konrad Eisele
2012-04-16 18:33 ` David Miller
2012-04-17 6:37 ` Konrad Eisele
2012-04-18 3:41 ` David Miller
2012-04-18 6:33 ` Konrad Eisele
2012-04-19 9:33 ` Konrad Eisele [this message]
2012-04-19 9:34 ` Konrad Eisele
2012-04-19 17:36 ` David Miller
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=4F8FDBE4.10107@gaisler.com \
--to=konrad@gaisler.com \
--cc=sparclinux@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.