public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Dmitry Adamushko" <dmitry.adamushko@gmail.com>
To: "Dan Upton" <upton.dan.linux@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: migration thread and active_load_balance
Date: Sun, 20 Apr 2008 23:26:28 +0200	[thread overview]
Message-ID: <b647ffbd0804201426r3bb55daw2899f6045b78fa51@mail.gmail.com> (raw)
In-Reply-To: <ba7d8f720804201121h6c024dcrabd301c8b4be7a4@mail.gmail.com>

On 20/04/2008, Dan Upton <upton.dan.linux@gmail.com> wrote:
> Back again with more questions about the scheduler, as I've spent two
>  or three days trying to debug on my own and I'm just not getting
>  anywhere.
>
>  Basically, I'm trying to add a new active balancing mechanism.  I made
>  out a diagram of how migration_thread  calls active_load_balance and
>  so on, and I use a flag (set by writing to a file in sysfs) to
>  determine whether to use the standard iterator for the CFS runqueue or
>  a different iterator I wrote.  The new iterator seems to work fine, as
>  I've been using it (again, with a flag) to replace the regular
>  iterator when it's called from schedule by idle_balance.  I basically
>  tried adding an extra conditional in migration_thread that sets up
>  some state and then calls active_load_balance, but I was getting
>  deadlocks.  I'm not really sure why, since all I've really changed is
>  add a few variables to struct rq and struct cfs_rq.
>
>  I tried only doing my state setup and restore in that conditional,
>  without actually calling active_load_balance, which has given me an
>  even more frustrating result--the kernel does not deadlock, but it
>  does seem to crash in such a manner as to require a hard reset of the
>  machine.  (For instance, at one point I got an "invalid page state in
>  process 'init'" message from the kernel; if I try to reboot from Gnome
>  though it hangs.)  I don't understand this at all, since as far as I
>  can tell I'm using thread-local variables and really all I'm doing
>  right now is assignments to them.  Unless, of course the struct rq
>  (from rq = cpu_rq(cpu);) could be being manipulated elsewhere, leading
>  to some sort of race condition...
>

can you post your modifications? I'd be much more easy to see what you
are doing...

thanks in advance.


>
>  Thanks,
>  -dan
>

-- 
Best regards,
Dmitry Adamushko

  reply	other threads:[~2008-04-20 21:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-20 18:21 migration thread and active_load_balance Dan Upton
2008-04-20 21:26 ` Dmitry Adamushko [this message]
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
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=b647ffbd0804201426r3bb55daw2899f6045b78fa51@mail.gmail.com \
    --to=dmitry.adamushko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=upton.dan.linux@gmail.com \
    /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