Re: [RFC][PATCH 0/3] Refactoring sched_entity and sched_rt_entity.

From: Dario Faggioli
Date: Tue Jan 04 2011 - 13:12:11 EST


On Tue, 2011-01-04 at 17:19 +0100, Peter Zijlstra wrote:
> > OTOH, groups are always considered both fair _and_ RT entities, for
> > example they're always queued in _both_ an RT run_list and a fair
> > rb-tree. So I can't put them in an union, because I need both at the
> > same time!
>
> Just like its now, keep a sched_entity per class.
>
> struct task_group {
>
> #ifdef CONFIG_FAIR_GROUP_SCHED
> struct sched_entity **cfs_se;
> ...
> #endif
>
> #ifdef CONFIG_RT_GROUP_SCHED
> struct sched_entity **rt_se;
> ...
> #endif
>
> }
>
Well, sure this can be done. But what about the common fields? I guess
you're suggesting to use something like `struct sched_entity_common' and
putting them there, aren't you?

If yes, I'm fine with that, although it'll add one more level of
indirection for those fields (e.g., p->se.comm.on_rq). Are we cool with
this?

> I see once clash with my current ttwu patch set though, see:
>
> http://lkml.org/lkml/2011/1/4/228
>
> But that should be easy to resolve.
>
It's based on current tip, and yes, I plan to keep it updated and solve
the clashes as soon as I run into them. :-)

Thanks and Regards,
Dario

--
<<This happens because I choose it to happen!>> (Raistlin Majere)
----------------------------------------------------------------------
Dario Faggioli, ReTiS Lab, Scuola Superiore Sant'Anna, Pisa (Italy)

http://retis.sssup.it/people/faggioli -- dario.faggioli@xxxxxxxxxx

Attachment: signature.asc
Description: This is a digitally signed message part