[lkml]   [2010]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC -v2 PATCH 2/3] sched: add yield_to function
    On Tue, Dec 14, 2010 at 12:03:58PM +0100, Mike Galbraith wrote:
    > On Tue, 2010-12-14 at 15:54 +0530, Srivatsa Vaddagiri wrote:
    > > On Tue, Dec 14, 2010 at 07:08:16AM +0100, Mike Galbraith wrote:
    > > > That part looks ok, except for the yield cross cpu bit. Trying to yield
    > > > a resource you don't have doesn't make much sense to me.
    > >
    > > So another (crazy) idea is to move the "yieldee" task on another cpu over to
    > > yielding task's cpu, let it run till the end of yielding tasks slice and then
    > > let it go back to the original cpu at the same vruntime position!
    > Yeah, pulling the intended recipient makes fine sense. If he doesn't
    > preempt you, you can try to swap vruntimes or whatever makes arithmetic
    > sense and will help. Dunno how you tell him how long he can keep the
    > cpu though,

    can't we adjust the new task's [prev_]sum_exec_runtime a bit so that it is
    preempted at the end of yielding task's timeslice?

    > and him somehow going back home needs to be a plain old
    > migration, no fancy restoration of ancient history vruntime.

    What is the issue if it gets queued at the old vruntime (assuming fair stick is
    still behind that)? Without that it will hurt fairness for the yieldee (and
    perhaps of the overall VM in this case).

    - vatsa

     \ /
      Last update: 2010-12-14 12:29    [W:0.020 / U:41.440 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site