[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABk29NvEW+aa3ysMOK2J24OHpWpjiAVqjfQ6+T_49V9Dp8T4Hg@mail.gmail.com>
Date: Mon, 23 Aug 2021 10:40:18 -0700
From: Josh Don <joshdon@...gle.com>
To: Vincent Guittot <vincent.guittot@...aro.org>
Cc: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Paul Turner <pjt@...gle.com>,
Oleg Rombakh <olegrom@...gle.com>,
Viresh Kumar <viresh.kumar@...aro.org>,
Steve Sistare <steven.sistare@...cle.com>,
Tejun Heo <tj@...nel.org>, Rik van Riel <riel@...riel.com>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 3/4] sched: reduce sched slice for SCHED_IDLE entities
On Mon, Aug 23, 2021 at 3:08 AM Vincent Guittot
<vincent.guittot@...aro.org> wrote:
>
> On Fri, 20 Aug 2021 at 03:04, Josh Don <joshdon@...gle.com> wrote:
> >
> > @@ -684,12 +696,13 @@ static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
> > for_each_sched_entity(se) {
> > struct load_weight *load;
> > struct load_weight lw;
> > + struct cfs_rq *qcfs_rq;
> >
> > - cfs_rq = cfs_rq_of(se);
> > - load = &cfs_rq->load;
> > + qcfs_rq = cfs_rq_of(se);
> > + load = &qcfs_rq->load;
> >
> > if (unlikely(!se->on_rq)) {
> > - lw = cfs_rq->load;
> > + lw = qcfs_rq->load;
> >
> > update_load_add(&lw, se->load.weight);
> > load = &lw;
> > @@ -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)) {
> > + if (se_is_idle(init_se) && !sched_idle_cfs_rq(cfs_rq))
>
> Like for place_entity, we should probably not dynamically switch
> between the 2 values below depending on the presence or not of non
> sched idle tasks and always use sysctl_sched_idle_min_granularity
My reasoning here is that sched_slice is something we reasonably
expect to change as tasks enqueue/dequeue, and unlike place_entity()
it does not create fairness issues by messing with vruntime.
Additionally, it would be preferable to use the larger min granularity
on a cpu running only idle tasks.
Powered by blists - more mailing lists