* [patch] DLS: fix switched_from_dl
@ 2012-04-10 14:25 Hillf Danton
2012-04-22 16:10 ` Juri Lelli
0 siblings, 1 reply; 2+ messages in thread
From: Hillf Danton @ 2012-04-10 14:25 UTC (permalink / raw)
To: Dario Faggioli, Juri Lelli; +Cc: LKML, Hillf Danton
Pull only if the current task switches from DLS, since it was not preempted
by pushable tasks waiting on other runqueues.
Signed-off-by: Hillf Danton <dhillf@gmail.com>
---
--- a/kernel/sched_dl.c Mon Apr 9 19:39:56 2012
+++ b/kernel/sched_dl.c Tue Apr 10 21:23:52 2012
@@ -1466,12 +1466,7 @@ static void switched_from_dl(struct rq *
hrtimer_try_to_cancel(&p->dl.dl_timer);
#ifdef CONFIG_SMP
- /*
- * Since this might be the only -deadline task on the rq,
- * this is the right place to try to pull some other one
- * from an overloaded cpu, if any.
- */
- if (!rq->dl.dl_nr_running)
+ if (p == rq->curr)
pull_dl_task(rq);
#endif
}
--
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] DLS: fix switched_from_dl
2012-04-10 14:25 [patch] DLS: fix switched_from_dl Hillf Danton
@ 2012-04-22 16:10 ` Juri Lelli
0 siblings, 0 replies; 2+ messages in thread
From: Juri Lelli @ 2012-04-22 16:10 UTC (permalink / raw)
To: Hillf Danton; +Cc: Dario Faggioli, LKML
On 04/10/2012 04:25 PM, Hillf Danton wrote:
> Pull only if the current task switches from DLS, since it was not preempted
> by pushable tasks waiting on other runqueues.
>
> Signed-off-by: Hillf Danton<dhillf@gmail.com>
> ---
>
> --- a/kernel/sched_dl.c Mon Apr 9 19:39:56 2012
> +++ b/kernel/sched_dl.c Tue Apr 10 21:23:52 2012
> @@ -1466,12 +1466,7 @@ static void switched_from_dl(struct rq *
> hrtimer_try_to_cancel(&p->dl.dl_timer);
>
> #ifdef CONFIG_SMP
> - /*
> - * Since this might be the only -deadline task on the rq,
> - * this is the right place to try to pull some other one
> - * from an overloaded cpu, if any.
> - */
> - if (!rq->dl.dl_nr_running)
> + if (p == rq->curr)
> pull_dl_task(rq);
> #endif
> }
> --
I'd stay with the original code. p (former -dl task) is going away
(changed its scheduling class from -dl to something else). If it was
the last -dl task on rq I'd probably want to pull someone else. No
assumptions needed in this case.
Thanks,
- Juri
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-22 16:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-10 14:25 [patch] DLS: fix switched_from_dl Hillf Danton
2012-04-22 16:10 ` Juri Lelli
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.