Re: [RFC PATCH 2/3] sched: add yield_to function

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mike Galbraith
Date: Thursday, December 2, 2010 - 10:54 pm

On Thu, 2010-12-02 at 14:44 -0500, Rik van Riel wrote:


That "slice remaining" only shows the distance to last preempt, however
brief.  It shows nothing wrt tree position, the yielding task may well
already be right of the task it wants to yield to, having been a buddy.
 

(This is usually done using max_vruntime())

If the recipient was already left of the fair stick (min_vruntime),
clipping advances it's vruntime, vaporizing entitlement from both donor
and recipient.

What if a task tries to yield to another not on the same cpu, and/or in
the same task group?  This would munge min_vruntime of other queues.  I
think you'd have to restrict this to same cpu, same group.  If tasks can
donate cross cfs_rq, (say) pinned task A cpu A running solo could donate
vruntime to selected tasks pinned to cpu B, for as long as minuscule
preemptions can resupply ammo.  Would suck to not be the favored child.

Maybe you could exchange vruntimes cooperatively (iff same cfs_rq)
between threads, but I don't think donations with clipping works.

	-Mike

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 2/3] sched: add yield_to function, Rik van Riel, (Thu Dec 2, 12:44 pm)
Re: [RFC PATCH 2/3] sched: add yield_to function, Chris Wright, (Thu Dec 2, 5:50 pm)
Re: [RFC PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Thu Dec 2, 10:54 pm)
Re: [RFC PATCH 2/3] sched: add yield_to function, Peter Zijlstra, (Fri Dec 3, 6:23 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Srivatsa Vaddagiri, (Fri Dec 3, 6:30 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Srivatsa Vaddagiri, (Fri Dec 3, 6:46 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Peter Zijlstra, (Fri Dec 3, 7:03 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Srivatsa Vaddagiri, (Fri Dec 3, 7:06 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Srivatsa Vaddagiri, (Fri Dec 3, 7:10 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Fri Dec 3, 7:45 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Rik van Riel, (Fri Dec 3, 7:48 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Fri Dec 3, 8:09 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Rik van Riel, (Fri Dec 3, 8:35 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Srivatsa Vaddagiri, (Fri Dec 3, 9:20 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Rik van Riel, (Fri Dec 3, 10:09 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Srivatsa Vaddagiri, (Fri Dec 3, 10:29 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Rik van Riel, (Fri Dec 3, 10:33 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Srivatsa Vaddagiri, (Fri Dec 3, 10:45 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Rik van Riel, (Fri Dec 3, 11:27 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Chris Wright, (Fri Dec 3, 12:30 pm)
Re: [RFC PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Fri Dec 3, 1:05 pm)
Re: [RFC PATCH 2/3] sched: add yield_to function, Peter Zijlstra, (Fri Dec 3, 2:23 pm)
Re: [RFC PATCH 2/3] sched: add yield_to function, Peter Zijlstra, (Fri Dec 3, 2:26 pm)
Re: [RFC PATCH 2/3] sched: add yield_to function, Peter Zijlstra, (Fri Dec 3, 2:30 pm)
Re: [RFC PATCH 2/3] sched: add yield_to function, Rik van Riel, (Sat Dec 4, 6:02 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Rik van Riel, (Wed Dec 8, 10:55 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Peter Zijlstra, (Wed Dec 8, 1:00 pm)
Re: [RFC PATCH 2/3] sched: add yield_to function, Peter Zijlstra, (Wed Dec 8, 1:04 pm)
Re: [RFC PATCH 2/3] sched: add yield_to function, Rik van Riel, (Wed Dec 8, 3:59 pm)
Re: [RFC PATCH 2/3] sched: add yield_to function, Rik van Riel, (Thu Dec 9, 9:34 pm)
Re: [RFC PATCH 2/3] sched: add yield_to function, Srivatsa Vaddagiri, (Fri Dec 10, 1:39 am)
Re: [RFC PATCH 2/3] sched: add yield_to function, Rik van Riel, (Fri Dec 10, 7:55 am)