Messages in this thread | | | Subject | Re: [PATCH 06/16] sched: SCHED_DEADLINE push and pull logic | From | Peter Zijlstra <> | Date | Tue, 24 Apr 2012 20:53:43 +0200 |
| |
On Tue, 2012-04-24 at 14:50 -0400, Steven Rostedt wrote: > > Something like so: https://lkml.org/lkml/2012/2/16/487 ? > > But it still does the same thing: > > +static struct task_struct * > +pick_next_task_rt(struct rq *rq, struct task_struct *prev) > { > - struct task_struct *p = _pick_next_task_rt(rq); > + struct task_struct *p; > + struct rt_rq *rt_rq = &rq->rt; > + > + if (!rt_rq->rt_nr_running) > + return NULL; > + > + if (rt_rq_throttled(rt_rq)) > + return NULL; > + > + if (prev) > + prev->sched_class->put_prev_task(rq, prev); > + > + p = _pick_next_task_rt(rq); > > Now if we can do the _pick_next_task_rt() before put_prev_task(), and > only do the put_prev_task() if p != prev, then that would be something.
Well that's up to the implementation of pick_next_task_rt() that conversion is just a minimal make it work thing.
But the generic changes that patch carries should allow you to do what you want, right?
| |