lkml.org 
[lkml]   [2019]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v4] sched/core: Preempt current task in favour of bound kthread
    On Thu, Dec 12, 2019 at 11:10:31AM +0100, Peter Zijlstra wrote:
    > @@ -4156,13 +4159,13 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
    > if (delta_exec < sysctl_sched_min_granularity)
    > return;
    >
    > - se = __pick_first_entity(cfs_rq);
    > + se = __pick_next_entity(cfs_rq, NULL);
    > delta = curr->vruntime - se->vruntime;
    >
    > if (delta < 0)
    > return;

    What I mean with the below comment is, when this isn't enough, try
    something like:

    if (se == cfs_rq->next)
    ideal_runtime /= 2;

    to make it yield sooner to 'next' buddies. Sadly, due to the whole
    cgroup mess, we can't say what actual task is on the end of it (without
    doing a full hierarchy pick, which is more expensive still).

    > - if (delta > ideal_runtime)
    > + if (delta > ideal_runtime) // maybe frob this too ?
    > resched_curr(rq_of(cfs_rq));
    > }

    \
     
     \ /
      Last update: 2019-12-12 11:15    [W:3.115 / U:1.372 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site