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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mike Galbraith
Date: Friday, December 17, 2010 - 12:51 pm

On Fri, 2010-12-17 at 17:09 +0200, Avi Kivity wrote:

Task X wants control of when runnable task Y gets the cpu.  Task X
clearly wants to be the scheduler.  This isn't about _yielding_ diddly
spit, it's about individual tasks wanting to make scheduling decisions,
so calling it a yield is high grade horse-pookey.  You're trying to give
the scheduler a hint, the stronger that hint, the happier you'll be.

I can see the problem, and I'm not trying to be Mr. Negative here, I'm
only trying to point out problems I see with what's been proposed.  

If the yielding task had a concrete fee he could pay, that would be
fine, but he does not.

If he did have something, how often do you think it should be possible
for task X to bribe the scheduler into selecting task Y?  Will his
pockets be deep enough to actually solve the problem?  Once he's
yielded, he's out of the picture for a while if he really gave anything
up.  What happens to donated entitlement when the recipient goes to
sleep?  If you try to give it back, what happens if the donor exited?
Where did the entitlement come from if task A running alone on cpu A
tosses some entitlement over the fence to his pal task B on cpu B.. and
keeps on trucking on cpu A?  Where does that leave task C, B's
competition?


Nothing between the lines about it.  There are N individual engines,
coupled via load balancing.

	-Mike

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

Messages in current thread:
[RFC -v2 PATCH 2/3] sched: add yield_to function, Rik van Riel, (Mon Dec 13, 8:46 pm)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Mon Dec 13, 11:08 pm)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Srivatsa Vaddagiri, (Tue Dec 14, 3:24 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Tue Dec 14, 4:03 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Srivatsa Vaddagiri, (Tue Dec 14, 4:26 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Peter Zijlstra, (Tue Dec 14, 5:22 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Tue Dec 14, 5:47 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Rik van Riel, (Thu Dec 16, 12:49 pm)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Thu Dec 16, 11:56 pm)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Fri Dec 17, 12:15 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Avi Kivity, (Fri Dec 17, 8:09 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Fri Dec 17, 12:51 pm)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Rik van Riel, (Sat Dec 18, 7:50 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Avi Kivity, (Sat Dec 18, 10:02 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Avi Kivity, (Sat Dec 18, 10:08 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Sat Dec 18, 12:06 pm)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Sat Dec 18, 12:13 pm)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Avi Kivity, (Sat Dec 18, 11:08 pm)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Avi Kivity, (Sat Dec 18, 11:21 pm)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Avi Kivity, (Sun Dec 19, 2:19 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Sun Dec 19, 3:05 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Sun Dec 19, 4:18 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Mon Dec 20, 1:39 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Avi Kivity, (Mon Dec 20, 1:45 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Mon Dec 20, 1:55 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Avi Kivity, (Mon Dec 20, 2:03 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Mon Dec 20, 2:30 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Avi Kivity, (Mon Dec 20, 2:46 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Mon Dec 20, 3:33 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Avi Kivity, (Mon Dec 20, 3:39 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Mon Dec 20, 3:46 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Avi Kivity, (Mon Dec 20, 3:49 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Mon Dec 20, 3:50 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Avi Kivity, (Mon Dec 20, 4:06 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Rik van Riel, (Mon Dec 20, 8:40 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Mon Dec 20, 9:04 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Mon Dec 27, 10:54 pm)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Gene Heskett, (Mon Dec 27, 11:08 pm)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Mike Galbraith, (Mon Dec 27, 11:16 pm)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Gene Heskett, (Tue Dec 28, 9:18 am)
Re: [RFC -v2 PATCH 2/3] sched: add yield_to function, Rik van Riel, (Tue Dec 28, 3:34 pm)