public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wanpeng Li <wanpeng.li@linux.intel.com>
To: Juri Lelli <juri.lelli@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Wanpeng Li <wanpeng.li@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v13] sched/deadline: support dl task migration during cpu hotplug
Date: Fri, 27 Mar 2015 07:00:45 +0800	[thread overview]
Message-ID: <20150326230045.GA6271@kernel> (raw)
In-Reply-To: <5513EA1D.30208@arm.com>

Hi Juri,
On Thu, Mar 26, 2015 at 11:14:37AM +0000, Juri Lelli wrote:
>
>I think we could have better naming and the BUG_ON part could be
>simplified. I'd propose something like this (sorry, it is based
>on one of your previous versions.. I'm a bit struggling keeping
>up with the pace ;)).

Cool, thanks for your help, I will send a newer version later. ;)

Regards,
Wanpeng Li 

>
>Thanks!
>
>---
> kernel/sched/deadline.c | 20 +++++++++-----------
> 1 file changed, 9 insertions(+), 11 deletions(-)
>
>diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
>index 1820d1b..2b260a9 100644
>--- a/kernel/sched/deadline.c
>+++ b/kernel/sched/deadline.c
>@@ -518,7 +518,7 @@ static int start_dl_timer(struct sched_dl_entity *dl_se, bool boosted)
> 
> static struct rq *find_lock_later_rq(struct task_struct *task, struct rq *rq);
> 
>-static void dl_task_migration(struct rq *rq, struct task_struct *p)
>+static void dl_task_offline_migration(struct rq *rq, struct task_struct *p)
> {
> 	struct rq *later_rq = NULL;
> 	bool fallback = false;
>@@ -535,14 +535,12 @@ static void dl_task_migration(struct rq *rq, struct task_struct *p)
> 		fallback = true;
> 		cpu = cpumask_any_and(cpu_active_mask, tsk_cpus_allowed(p));
> 		if (cpu >= nr_cpu_ids) {
>-			if (dl_bandwidth_enabled()) {
>-				/*
>-				 * Fail to find any suitable cpu.
>-				 * The task will never come back!
>-				 */
>-				WARN_ON(1);
>-				return;
>-			}
>+			/*
>+			 * Fail to find any suitable cpu.
>+			 * The task will never come back!
>+			 */
>+			BUG_ON(dl_bandwidth_enabled());
>+
> 			/*
> 			 * If admission control is disabled we
> 			 * try a little harder to let the task
>@@ -609,11 +607,11 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
> 	update_rq_clock(rq);
> 
> 	/*
>-	 * So if we find that the rq the task was on is no longer
>+	 * If we find that the rq the task was on is no longer
> 	 * available, we need to select a new rq.
> 	 */
> 	if (unlikely(!rq->online)) {
>-		dl_task_migration(rq, p);
>+		dl_task_offline_migration(rq, p);
> 		goto unlock;
> 	}
> 
>-- 
>2.3.0

      reply	other threads:[~2015-03-26 23:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 23:47 [PATCH v13] sched/deadline: support dl task migration during cpu hotplug Wanpeng Li
2015-03-26 11:14 ` Juri Lelli
2015-03-26 23:00   ` Wanpeng Li [this message]

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=20150326230045.GA6271@kernel \
    --to=wanpeng.li@linux.intel.com \
    --cc=juri.lelli@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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