Re: [git] CFS-devel, latest code

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Mike Galbraith <efault@...>, <linux-kernel@...>, Peter Zijlstra <a.p.zijlstra@...>, Dhaval Giani <dhaval@...>, Dmitry Adamushko <dmitry.adamushko@...>, Andrew Morton <akpm@...>
Date: Tuesday, September 25, 2007 - 10:48 am

On Tue, Sep 25, 2007 at 01:33:06PM +0200, Ingo Molnar wrote:

You seem to have hit the nerve for this problem. The two patches I sent:

	http://lkml.org/lkml/2007/9/25/117
	http://lkml.org/lkml/2007/9/25/168

partly help, but we can do better.


This one feels wrong, although I can't express my reaction correctly ..


Note that parent entities for a task is per-cpu. So if a task A
belonging to userid guest hops from CPU0 to CPU1, then it gets a new parent 
entity as well, which is different from its parent entity on CPU0.

Before:
	taskA->se.parent = guest's tg->se[0]

After:
	taskA->se.parent = guest's tg->se[1]

So walking up the entity hierarchy and fixing up (parent)se->vruntime will do
little good after the task has moved to a new cpu.

IMO, we need to be doing this :

	- For dequeue of higher level sched entities, simulate as if
	  they are going to "sleep" 
	- For enqueue of higher level entities, simulate as if they are
	  "waking up". This will cause enqueue_entity() to reset their
	  vruntime (to existing value for cfs_rq->min_vruntime) when they 
	  "wakeup".

If we don't do this, then lets say a group had only one task (A) and it
moves from CPU0 to CPU1. Then on CPU1, when group level entity for task
A is enqueued, it will have a very low vruntime (since it was never
running) and this will give task A unlimited cpu time, until its group
entity catches up with all the "sleep" time.

Let me try a fix for this next ..

-- 
Regards,
vatsa
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[git] CFS-devel, latest code, Ingo Molnar, (Mon Sep 24, 5:45 pm)
Re: [git] CFS-devel, latest code, Andrew Morton, (Tue Sep 25, 3:41 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 4:43 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 7:00 am)
Re: [git] CFS-devel, latest code, Andrew Morton, (Tue Sep 25, 4:48 am)
Re: [git] CFS-devel, latest code, S.Çağlar, (Tue Sep 25, 2:50 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 5:17 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 2:10 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 3:35 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 4:33 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 5:13 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 5:44 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 5:40 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 6:10 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 6:28 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 8:28 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 8:54 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 6:36 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 8:51 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 9:35 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 10:07 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 7:33 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 10:48 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 5:17 am)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 5:47 am)
Re: [git] CFS-devel, latest code, Bill Davidsen, (Fri Sep 28, 5:46 pm)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Wed Sep 26, 4:04 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 6:02 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 4:53 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 5:12 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Tue Sep 25, 5:11 am)
Re: [git] CFS-devel, latest code, Mike Galbraith, (Tue Sep 25, 5:15 am)
Re: [git] CFS-devel, latest code, Daniel Walker, (Mon Sep 24, 8:08 pm)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Tue Sep 25, 2:45 am)
Re: [git] CFS-devel, latest code, Daniel Walker, (Tue Sep 25, 11:17 am)
Re: [git] CFS-devel, latest code, Andrew Morton, (Mon Sep 24, 5:55 pm)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Mon Sep 24, 5:59 pm)