From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Peter Boonstoppel <pboonstoppel@nvidia.com>
Cc: "mingo@kernel.org" <mingo@kernel.org>,
"pjt@google.com" <pjt@google.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"seto.hidetoshi@jp.fujitsu.com" <seto.hidetoshi@jp.fujitsu.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Peter De Schrijver <pdeschrijver@nvidia.com>
Subject: Re: [PATCH] sched: unthrottle rt_rq in migrate_tasks()
Date: Fri, 25 May 2012 16:49:21 +0200 [thread overview]
Message-ID: <1337957361.9783.213.camel@laptop> (raw)
In-Reply-To: <5FBF8E85CA34454794F0F7ECBA79798F379AD507F2@HQMAIL04.nvidia.com>
On Fri, 2012-05-18 at 11:56 -0700, Peter Boonstoppel wrote:
> migrate_tasks() uses _pick_next_task_rt() to get tasks from the
> real-time runqueue to be migrated. When rt_rq is throttled
> _pick_next_task_rt() won't return anything, in which case
> migrate_tasks() can't move all threads over and gets stuck in an
> infinite loop.
>
> Instead unthrottle rt_rq before migrating tasks.
>
> Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
> ---
> kernel/sched/core.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 9236a48..b37e0b3 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -5159,6 +5159,12 @@ static void migrate_tasks(unsigned int dead_cpu)
> /* Ensure any throttled groups are reachable by pick_next_task */
> unthrottle_offline_cfs_rqs(rq);
>
> + /*
> + * Ensure rt_rq is not throttled so its threads can be migrated using
> + * pick_next_task_rt
> + */
> + rq->rt.rt_throttled = 0;
> +
> for ( ; ; ) {
> /*
> * There's this thread running, bail when that's the only
OK, so there's two things:
- there's a set_rq_offline() call in CPU_DYING right before calling
migrate_tasks(). This would end up calling rq_offline_rt() which should
disable all the runtime muck.
- If the above doesn't unthrottle rqs (looks like it doesn't, should
it?) you still only unthrottle the root and 'forgot' to deal with
cgroups.
So I think I'm going to ask you to make rq_offline_rt() dtrt, and while
you're at it, move unthrottle_offline_cfs_rqs() to rq_offline_fair().
next prev parent reply other threads:[~2012-05-25 14:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-18 18:56 [PATCH] sched: unthrottle rt_rq in migrate_tasks() Peter Boonstoppel
2012-05-25 14:49 ` Peter Zijlstra [this message]
2012-06-22 17:49 ` [PATCH 1/1] sched: unthrottle rt runqueues in __disable_runtime() Peter Boonstoppel
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=1337957361.9783.213.camel@laptop \
--to=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pboonstoppel@nvidia.com \
--cc=pdeschrijver@nvidia.com \
--cc=pjt@google.com \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=tglx@linutronix.de \
/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