[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d2789d23-816b-11f1-d654-a7989f323ac8@arm.com>
Date: Thu, 10 Nov 2022 12:16:26 +0100
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Peter Zijlstra <peterz@...radead.org>,
Kajetan Puchalski <kajetan.puchalski@....com>
Cc: Jian-Min Liu <jian-min.liu@...iatek.com>,
Ingo Molnar <mingo@...nel.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Morten Rasmussen <morten.rasmussen@....com>,
Vincent Donnefort <vdonnefort@...gle.com>,
Quentin Perret <qperret@...gle.com>,
Patrick Bellasi <patrick.bellasi@...bug.net>,
Abhijeet Dharmapurikar <adharmap@...cinc.com>,
Qais Yousef <qais.yousef@....com>,
linux-kernel@...r.kernel.org,
Jonathan JMChen <jonathan.jmchen@...iatek.com>
Subject: Re: [RFC PATCH 0/1] sched/pelt: Change PELT halflife at runtime
On 07/11/2022 14:41, Peter Zijlstra wrote:
> On Thu, Sep 29, 2022 at 03:41:47PM +0100, Kajetan Puchalski wrote:
[...]
> @@ -2956,13 +2958,26 @@ static inline unsigned long cpu_util_dl(struct rq *rq)
> */
> static inline unsigned long cpu_util_cfs(int cpu)
> {
> + struct rq *rq = cpu_rq(cpu);
> struct cfs_rq *cfs_rq;
> unsigned long util;
>
> - cfs_rq = &cpu_rq(cpu)->cfs;
> + cfs_rq = &rq->cfs;
> util = READ_ONCE(cfs_rq->avg.util_avg);
>
> if (sched_feat(UTIL_EST)) {
> + if (sched_feat(UTIL_EST_FASTER)) {
> + struct task_struct *curr;
> +
> + rcu_read_lock();
> + curr = rcu_dereference(rq->curr);
> + if (likely(curr->sched_class == &fair_sched_class)) {
> + u64 runtime = curr->se.sum_exec_runtime - curr->se.exec_start;
Don't we and up with gigantic runtime numbers here?
oot@...o:~# cat /proc/1676/task/1676/schedstat
36946300 1150620 11
root@...o:~# cat /proc/1676/task/1676/sched
rt-app (1676, #threads: 2)
-------------------------------------------------------------------
se.exec_start : 77766.964240 <- !
se.vruntime : 563.587883
e.sum_exec_runtime : 36.946300 <- !
se.nr_migrations : 0
...
I expect cpu_util_cfs() to be ~1024 almost all the time now.
> + util = max_t(unsigned long, util,
> + faster_est_approx(runtime * 2));
> + }
> + rcu_read_unlock();
> + }
> util = max_t(unsigned long, util,
> READ_ONCE(cfs_rq->avg.util_est.enqueued));
> }
[...]
Powered by blists - more mailing lists