Re: [patch v4 07/18] sched: set initial load avg of new forked task

From: Alex Shi
Date: Wed Feb 20 2013 - 00:13:26 EST

> This is my concern about making this a special case with the
> introduction ENQUEUE_NEWTASK flag; enqueue jumps through enough hoops
> as it is.
> I still don't see why we can't resolve this at init time in
> __sched_fork(); your patch above just moves an explicit initialization
> of load_avg_contrib into the enqueue path. Adding a call to
> __update_task_entity_contrib() to the previous alternate suggestion
> would similarly seem to resolve this?

Without ENQUEUE_NEWTASK flag, we can use the following patch. That embeds
the new fork with a implicate way.

but since the newtask flag just follows existing enqueue path, it also
looks natural and is a explicit way.

I am ok for alternate of solutions.