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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to