Re: [RFC tg_shares_up improvements - v1 01/12] sched: rewrite tg_shares_up

Peter Zijlstra
2010-10-21T09:08:25Z

On Thu, 2010-10-21 at 13:38 +0530, Bharata B Rao wrote:
> > + se->on_rq = 0;
>
> Since setting and un-setting of se->on_rq is completely handled within
> sched_fair.c, we can remove the redundant setting and un-setting of
> se->on_rq from sched.c:[en]dequeue_task. Even w/o this patch, they were
> redundant I suppose.

sadly not, sched_rt.c also uses them. It really shouldn't live in
sched_entity but in a common set.

I've long wanted to rework all that into something like:

struct sched_entity {
/* common fields */
union {
struct sched_fair_entity fair;
struct sched_rt_entity rt;
};
};

But that never quite happened.