lkml.org 
[lkml]   [2024]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    SubjectRe: [RFC][PATCH 10/10] sched/eevdf: Use sched_attr::sched_runtime to set request/slice suggestion
    Date
    On Fri, 05 Apr 2024 12:28:04 +0200 Peter Zijlstra <peterz@infradead.org>
    > Allow applications to directly set a suggested request/slice length using
    > sched_attr::sched_runtime.
    >
    > The implementation clamps the value to: 0.1[ms] <= slice <= 100[ms]
    > which is 1/10 the size of HZ=1000 and 10 times the size of HZ=100.
    >
    Given HZ=100 for example, what is preventing applications of suggested
    slice=0.5ms from running 5ms a tick? If slice is 90ms otoh, is tick able
    to kick the curr that has been on cpu for 10ms off cpu, given
    cfs_rq->nr_running > 1?

    > --- a/kernel/sched/fair.c
    > +++ b/kernel/sched/fair.c
    > @@ -984,7 +984,8 @@ static void update_deadline(struct cfs_r
    > * nice) while the request time r_i is determined by
    > * sysctl_sched_base_slice.
    > */
    > - se->slice = sysctl_sched_base_slice;
    > + if (!se->custom_slice)
    > + se->slice = sysctl_sched_base_slice;
    >
    > /*
    > * EEVDF: vd_i = ve_i + r_i / w_i

    \
     
     \ /
      Last update: 2024-05-27 16:27    [W:5.708 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site