On Wed, May 17, 2017 at 11:50:45AM +0200, Vincent Guittot wrote: > Le Wednesday 17 May 2017 à 09:04:47 (+0200), Vincent Guittot a écrit :
> > I wonder if there is a problem with this new way to compute se's > > load_avg and cfs_rq's load_avg when a task changes is nice prio before > > migrating to another CPU. > > > > se load_avg is now: runnable x current weight > > but cfs_rq load_avg keeps the history of the previous weight of the se > > When we detach se, we will remove an up to date se's load_avg from > > cfs_rq which doesn't have the up to date load_avg in its own load_avg. > > So if se's prio decreases just before migrating, some load_avg stays > > in prev cfs_rq and if se's prio increases, we will remove too much > > load_avg and possibly make the cfs_rq load_avg null whereas other > > tasks are running. > > > > Thought ? > > > > I'm able to reproduce the problem with a simple rt-app use case (after > > adding a new feature in rt-app) > > > > Vincent > > > > The hack below fixes the problem I mentioned above. It applies on task what is > done when updating group_entity's weight Right. I didn't think people much used nice so I skipped it for now. Yes your patch looks about right for that. I'll include it, thanks!

