Re: [PATCH 1/2] sched: push rt tasks only if newly activated tasks have been added

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dmitry Adamushko
Date: Wednesday, April 23, 2008 - 4:20 am

2008/4/23 Gregory Haskins <ghaskins@novell.com>:

No, it's better indeed to delay push_rt_tasks() until
post_rt_schedule() when 'current' (that's a task to be preempted) is
also available for potential migration.

Not considering "current" (as it's running) in task_wake_up_rt()   is
a key of the problem which I illustrated in my first message.

I mean, we set rq->rt.pushed = 1 and that kind of means "nothing to be
push off here any more" but "current" was out of our consideration.

humm... a quick idea (should think more on it):

(1) select_task_rq_rt() + task_wake_up_rt() should consider only 'p'
(a newly woken up task) for pushing off a cpu;

i.e. task_wake_up_rt() calls push_rt_task(..., p) and _never_ sets up
rq->rt.pushed;

the main point where 'pushed' is done :
(2) post_schedule_rt()

here we call push_rt_tasks() and set up rq->rt.pushed to 1.

heh, I can be missing something important... need to verify different
scenarios wrt this algo.




Agreed. And as I noticed above, ex-current is also available for
migration policies at this point + the most eligible task has just got
control (and it's the only task that shouldn't be considered for
migration).


-- 
Best regards,
Dmitry Adamushko
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/2] sched: refreshes, Gregory Haskins, (Mon Apr 21, 11:10 am)
Re: [PATCH 0/2] sched: refreshes, Ingo Molnar, (Mon Apr 21, 12:33 pm)
[RFC PATCH 0/2] sched fixes for suboptimal balancing, Gregory Haskins, (Wed Apr 23, 4:13 am)
[PATCH 1/2] sched: fix RT task-wakeup logic, Gregory Haskins, (Wed Apr 23, 4:13 am)
Re: [PATCH 1/2] sched: push rt tasks only if newly activat ..., Dmitry Adamushko, (Wed Apr 23, 4:20 am)
Re: [PATCH 1/2] sched: fix RT task-wakeup logic, Steven Rostedt, (Wed Apr 23, 5:54 am)
Re: [PATCH 1/2] sched: fix RT task-wakeup logic, Dmitry Adamushko, (Wed Apr 23, 7:29 am)
Re: [PATCH 1/2] sched: fix RT task-wakeup logic, Gregory Haskins, (Thu Apr 24, 4:56 am)
[(RESEND) PATCH] sched: fix RT task-wakeup logic, Gregory Haskins, (Mon Apr 28, 9:30 am)
Re: [(RESEND) PATCH] sched: fix RT task-wakeup logic, Ingo Molnar, (Tue Apr 29, 7:35 am)