From: Robert Love <rml@tech9.net>
To: Andrew Morton <akpm@zip.com.au>
Cc: lkml <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: preempt-related hangs
Date: 24 Mar 2002 21:30:26 -0500 [thread overview]
Message-ID: <1017023430.13141.13.camel@phantasy> (raw)
In-Reply-To: <3C9E8767.4F57CB0A@zip.com.au>
On Sun, 2002-03-24 at 21:11, Andrew Morton wrote:
> OK, this patch fixed it. I don't know why.
Eh, odd. That effectively disables kernel preemption around
set_cpus_allowed, but preemption is already disabled by the task_rq_lock
call. Note, however, preemption is enabled by the task_rq_unlock and
thus wake_up_process is called with preemption enabled.
With your patch, preemption is now disabled across the call, and
subsequently the task_rq_unlock in try_to_wake_up will never call
preempt_schedule and your lock does not happen.
The actual problem may be elsewhere, and this just hides it. This is
pretty clear, since we would get a similar effect just wrapping
wake_up_process in preempt_disable. But, oh, try_to_wake_up disables
preempt, too ... hrm.
Hm, what if try_to_wake_up wakes up a process and then preemptively
schedules into it and it wants to acquire the req.sem semaphore, but
cannot, as it is still taken by set_cpus_allowed? The semaphore seems
to just be used in the migration code.
So we have init spinning on softirq threads to come up and then we have
a deadlock on req.sem from set_cpus_allowed and into the migration
thread?
Bleh ... Ingo?
Robert Love
next prev parent reply other threads:[~2002-03-25 2:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-25 1:59 Andrew Morton
2002-03-25 2:11 ` Andrew Morton
2002-03-25 2:30 ` Robert Love [this message]
2002-03-25 2:33 ` Anton Altaparmakov
2002-03-25 2:40 ` Robert Love
2002-03-25 2:48 ` Andrew Morton
2002-03-25 8:04 ` Zwane Mwaikambo
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=1017023430.13141.13.camel@phantasy \
--to=rml@tech9.net \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®