From: "Dan Upton" <upton.dan.linux@gmail.com>
To: "Dmitry Adamushko" <dmitry.adamushko@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: migration thread and active_load_balance
Date: Tue, 22 Apr 2008 15:19:33 -0400 [thread overview]
Message-ID: <ba7d8f720804221219wc1f04ecp3df0ec627dbc6c8e@mail.gmail.com> (raw)
In-Reply-To: <b647ffbd0804211339h6220489dt94f4c982204d7a3d@mail.gmail.com>
On Mon, Apr 21, 2008 at 4:39 PM, Dmitry Adamushko
<dmitry.adamushko@gmail.com> wrote:
> On 21/04/2008, Dan Upton <upton.dan.linux@gmail.com> wrote:
> > On Mon, Apr 21, 2008 at 7:03 AM, Dmitry Adamushko
> >
> > <dmitry.adamushko@gmail.com> wrote:
> >
> > > On 21/04/2008, Dan Upton <upton.dan.linux@gmail.com> wrote:
> > > > [ ... ]
> > >
> > > >
> > > > kernel BUG at kernel/sched.c:2103
> > >
> > > and what's this line in your patched sched.c?
> > >
> > > is it -- BUG_ON(!irqs_disabled()); ?
> > >
> > > anything in your unposted code (e.g. find_coolest_cpu()) that might
> > > re-enable the interrupts before __migration_task() is called?
> > >
> > > If you post your modifications as a patch
> > > (Documentation/applying-patches.txt) that contains _all_ relevant
> > > modifications, it'd be easier to guess what's wrong.
> >
> >
> > Yes, that's the line. I don't recall ever reenabling interrupts,
>
> migration_thread() -> find_coolest_cpu() -> get_temperature() ->
> rdmsr_on_cpu() -> [ if your configuration is SMP ] ->
> smp_call_function_single() ->
>
> (arch/x86/kernel/smpcommon.c)
> ...
> if (cpu == me) {
> local_irq_disable();
> func(info);
> local_irq_enable(); <----------- REENABLES the interrupts
> put_cpu();
> return 0;
> }
> ...
>
> as a result, __migrate_task() -> double_rq_lock() -> BUG_ON(!irqs_disabled())
> gives you an "oops".
>
Ah, how about that. Thanks, I at least fixed the oops by caching
return values from get_temperature() and then using those instead of
calling rdmsr_on_cpu when calling from migration_thread(). Everything
works up to the point of uncommenting the new call to
active_load_balance, which again yields a deadlock. (Man, I love
working in the scheduler...) Anyway, I'll keep trying to debug that on
my own again, but did anybody notice anything I'm doing that might
lead to deadlock?
-dan
next prev parent reply other threads:[~2008-04-22 19:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-20 18:21 Dan Upton
2008-04-20 21:26 ` Dmitry Adamushko
2008-04-21 0:44 ` Dan Upton
2008-04-21 11:03 ` Dmitry Adamushko
2008-04-21 19:38 ` Dan Upton
2008-04-21 20:39 ` Dmitry Adamushko
2008-04-22 19:19 ` Dan Upton [this message]
2008-04-20 21:35 ` Andi Kleen
2008-04-21 0:46 ` Dan Upton
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=ba7d8f720804221219wc1f04ecp3df0ec627dbc6c8e@mail.gmail.com \
--to=upton.dan.linux@gmail.com \
--cc=dmitry.adamushko@gmail.com \
--cc=linux-kernel@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 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®