Messages in this thread | | | From | Josh Don <> | Date | Tue, 24 Aug 2021 10:04:29 -0700 | Subject | Re: [PATCH v3 3/4] sched: reduce sched slice for SCHED_IDLE entities |
| |
Hi Jiang,
On Tue, Aug 24, 2021 at 3:25 AM Jiang Biao <benbjiang@gmail.com> wrote: > > Why not just ignore min granularity when normal entities compete with > a SCHED_IDLE entity? something like this, > > @@ -697,8 +710,14 @@ static u64 sched_slice(struct cfs_rq *cfs_rq, > struct sched_entity *se) > slice = __calc_delta(slice, se->load.weight, load); > } > > - if (sched_feat(BASE_SLICE)) > - slice = max(slice, (u64)sysctl_sched_min_granularity); > + if (sched_feat(BASE_SLICE) > + && (!se_is_idle(init_se) || sched_idle_cfs_rq(cfs_rq))) > + slice = max(slice, (u64)sysctl_sched_min_granularity); > > return slice; > } > If so, there seems no need to introduce sysctl_sched_idle_min_granularity? :)
Ignoring min_gran entirely could lead to some really tiny slices; see discussion at https://lkml.org/lkml/2021/8/12/651.
| |