All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Avi Kivity <avi@qumranet.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [BUG] CFS vs cpu hotplug
Date: Sun, 29 Jun 2008 08:55:56 +0200	[thread overview]
Message-ID: <20080629065556.GA20398@elte.hu> (raw)
In-Reply-To: <b647ffbd0806281516i57392230idf06f99ff02d22cf@mail.gmail.com>


* Dmitry Adamushko <dmitry.adamushko@gmail.com> wrote:

> Hello,
> 
> it seems to be related to migrate_dead_tasks().
> 
> Firstly I added traces to see all tasks being migrated with 
> migrate_live_tasks() and migrate_dead_tasks(). On my setup the problem 
> pops up (the one with "se == NULL" in the loop of 
> pick_next_task_fair()) shortly after the traces indicate that some has 
> been migrated with migrate_dead_tasks()). btw., I can reproduce it 
> much faster now with just a plain cpu down/up loop.
> 
> [disclaimer] Well, unless I'm really missing something important in 
> this late hour [/desclaimer] pick_next_task() is not something 
> appropriate for migrate_dead_tasks() :-)
> 
> the following change seems to eliminate the problem on my setup 
> (although, I kept it running only for a few minutes to get a few 
> messages indicating migrate_dead_tasks() does move tasks and the 
> system is still ok)
> 
> [ quick hack ]
> 
> @@ -5887,6 +5907,7 @@ static void migrate_dead_tasks(unsigned int dead_cpu)
>                 next = pick_next_task(rq, rq->curr);
>                 if (!next)
>                         break;
> +               next->sched_class->put_prev_task(rq, next);
>                 migrate_dead(dead_cpu, next);
> 

thanks Dmitry - i've applied this chunk to tip/master and 
tip/sched/urgent, for more testing.

if this turns out to be the final and full fix today, would you mind to 
submit the rest of your checks as well? It seems like a rather sensible 
set of sanity checks. Put under CONFIG_SCHED_DEBUG or a new 
(default-off) config option.

it would also be _very_ nice to have a built-in cpu hotplug tester in 
the kernel, a'ka CONFIG_RCU_TORTURE_TEST=y. There's already sample code 
in kernel/tracing/ of how to initiate hotplug events from within the 
kernel.

	Ingo

  reply	other threads:[~2008-06-29  6:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-19 16:19 [BUG] CFS vs cpu hotplug Heiko Carstens
2008-06-19 18:05 ` Peter Zijlstra
2008-06-19 18:14   ` Peter Zijlstra
2008-06-19 21:14     ` Heiko Carstens
2008-06-19 21:26       ` Peter Zijlstra
2008-06-19 21:17   ` Heiko Carstens
2008-06-19 21:32   ` Peter Zijlstra
2008-06-19 21:49     ` Heiko Carstens
2008-06-20  8:51       ` Peter Zijlstra
2008-06-20 22:19         ` Heiko Carstens
2008-06-20 11:44   ` Dmitry Adamushko
2008-06-20 22:23     ` Heiko Carstens
2008-06-25 22:12 ` Dmitry Adamushko
2008-06-28 22:16   ` Dmitry Adamushko
2008-06-29  6:55     ` Ingo Molnar [this message]
2008-06-30  9:07     ` Heiko Carstens
2008-06-30  9:17       ` Ingo Molnar
2008-07-01  9:22         ` Lai Jiangshan
2008-07-01  9:31           ` Ingo Molnar
2008-07-01 10:09             ` Lai Jiangshan
2008-07-02  7:13             ` Lai Jiangshan
2008-07-02  8:50               ` Dmitry Adamushko
2008-07-02  9:23                 ` Lai Jiangshan
2008-07-07 10:26                   ` Miao Xie
2008-07-07 11:31                     ` Dmitry Adamushko
  -- strict thread matches above, loose matches on Subject: below --
2008-07-09 22:32 Dmitry Adamushko
2008-07-10  7:30 ` Heiko Carstens
2008-07-10  7:39   ` Ingo Molnar

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=20080629065556.GA20398@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=avi@qumranet.com \
    --cc=dmitry.adamushko@gmail.com \
    --cc=heiko.carstens@de.ibm.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 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.