Messages in this thread Patch in this message | | | From | Hillf Danton <> | Subject | Re: [RFC][PATCH 10/10] sched/eevdf: Use sched_attr::sched_runtime to set request/slice suggestion | Date | Sat, 6 Apr 2024 16:16:53 +0800 |
| |
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
| |