[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABk29Numf595wF6PiLd673TmFt6AV9qTEsWP7tSf2xPOKcGgLQ@mail.gmail.com>
Date: Mon, 14 Mar 2022 17:53: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>,
Benjamin Segall <bsegall@...gle.com>,
Mel Gorman <mgorman@...e.de>,
linux-kernel <linux-kernel@...r.kernel.org>, parth@...ux.ibm.com,
Qais Yousef <qais.yousef@....com>,
"Hyser,Chris" <chris.hyser@...cle.com>,
Pavan Kondeti <pkondeti@...eaurora.org>,
Valentin Schneider <valentin.schneider@....com>,
patrick.bellasi@...bug.net, David.Laight@...lab.com,
Paul Turner <pjt@...gle.com>, pavel@....cz,
Tejun Heo <tj@...nel.org>,
Dhaval Giani <dhaval.giani@...cle.com>, qperret@...gle.com,
Tim Chen <tim.c.chen@...ux.intel.com>
Subject: Re: [RFC 5/6] sched/fair: Take into account latency nice at wakeup
Hi Vincent,
On Fri, Mar 11, 2022 at 8:21 AM Vincent Guittot
<vincent.guittot@...aro.org> wrote:
>
[snip]
> +
> +static void check_preempt_from_idle(struct cfs_rq *cfs, struct sched_entity *se)
> +{
> + struct sched_entity *next;
> +
> + if (se->latency_weight <= 0)
> + return;
> +
> + if (cfs->nr_running <= 1)
> + return;
I don't quite understand this nr_running check.
> + /*
> + * When waking from idle, we don't need to check to preempt at wakeup
> + * the idle thread and don't set next buddy as a candidate for being
> + * picked in priority.
> + * In case of simultaneous wakeup from idle, the latency sensitive tasks
> + * lost opportunity to preempt non sensitive tasks which woke up
> + * simultaneously.
> + */
> +
> + if (cfs->next)
> + next = cfs->next;
> + else
> + next = __pick_first_entity(cfs);
> +
> + if (next && wakeup_preempt_entity(next, se) == 1)
> + set_next_buddy(se);
> +}
> +
What's the motivation to do this with the next buddy vs using wakeup
entity placement to achieve a similar result? The latter would also
more generically work when we aren't transitioning from idle. It also
doesn't suffer from some slight weirdness here in the interaction with
core scheduling, where rq->curr can be idle despite the presence of
runnable tasks if the cpu is forced idle.
Powered by blists - more mailing lists