Re: [PATCH] sched/fair: use signed long when compute energy delta in eas

2021-04-13 Thread Xuewen Yan
Hi > > > > > > In fair.c:select_task_rq_fair(), if feec() returns a error (< 0), then > > > prev_cpu is selected. I think it's better to still let feec() signal > > > that something happened and let select_task_rq_fair() select prev_cpu by > > > itself. > > In fair.c:select_task_rq_fair(), when

Re: [PATCH] sched/fair: use signed long when compute energy delta in eas

2021-04-12 Thread Xuewen Yan
Hi On Tue, Apr 13, 2021 at 1:15 AM Pierre Gondois wrote: > > Hi > > > > > > > > > > This patch-set is not significantly improving the execution time of > > > > > feec(). The results we have so far are an improvement of 5-10% in > > > > > execution time, with feec() being executed in < 10us. So

Re: [PATCH] sched/fair: use signed long when compute energy delta in eas

2021-04-12 Thread Xuewen Yan
Hi > > Hi, > > > > > > This patch-set is not significantly improving the execution time of > > > feec(). The results we have so far are an improvement of 5-10% in > > > execution time, with feec() being executed in < 10us. So the gain is not > > > spectacular. > > > > well, I meaned to cache all

Re: [PATCH] sched/fair: use signed long when compute energy delta in eas

2021-04-08 Thread Xuewen Yan
Hi > > Hi, > > Hi > > > > On Wed, Apr 7, 2021 at 10:11 PM Pierre wrote: > > > > > > Hi, > > > > I test the patch, but the overflow still exists. > > > > In the "sched/fair: Use pd_cache to speed up > > find_energy_efficient_cpu()" > > > > I wonder why recompute the cpu util when cpu==dst_cpu in >

Re: [PATCH] sched/fair: use signed long when compute energy delta in eas

2021-04-07 Thread Xuewen Yan
Hi On Wed, Apr 7, 2021 at 10:11 PM Pierre wrote: > > Hi, > > I test the patch, but the overflow still exists. > > In the "sched/fair: Use pd_cache to speed up find_energy_efficient_cpu()" > > I wonder why recompute the cpu util when cpu==dst_cpu in compute_energy(), > > when the dst_cpu's util

Re: [PATCH] sched/fair: use signed long when compute energy delta in eas

2021-04-06 Thread Xuewen Yan
Hi Dietmar On Fri, Apr 2, 2021 at 2:07 AM Dietmar Eggemann wrote: > > +cc: Pierre Gondois > > On 30/03/2021 11:45, Quentin Perret wrote: > > Hi, > > > > On Tuesday 30 Mar 2021 at 13:21:54 (+0800), Xuewen Yan wrote: > >> From: Xuewen Yan > >

[PATCH] sched/fair: use signed long when compute energy delta in eas

2021-03-29 Thread Xuewen Yan
From: Xuewen Yan now the energy delta compute as follow: base_energy_pd = compute_energy(p, -1, pd); --->Traverse all CPUs in pd --->em_pd_energy() - \ search for the max_sapre_c

[PATCH] cpufreq: Judging new_policy before update related_cpus

2021-02-02 Thread Xuewen Yan
From: Xuewen Yan When the policy->related_cpus are all offline, and then bring up one cpu, this time, if the ->online is NULL, the code would update the ->related_cpus with ->cpus, and now ->cpus is only one online cpu, as a result, the ->related_cpus is different from the orig

[tip: sched/core] sched/fair: Avoid stale CPU util_est value for schedutil in task dequeue

2021-01-14 Thread tip-bot2 for Xuewen Yan
The following commit has been merged into the sched/core branch of tip: Commit-ID: 8c1f560c1ea3f19e22ba356f62680d9d449c9ec2 Gitweb: https://git.kernel.org/tip/8c1f560c1ea3f19e22ba356f62680d9d449c9ec2 Author:Xuewen Yan AuthorDate:Fri, 18 Dec 2020 17:27:52 +08:00 Committer

[PATCH v4] sched/fair: Avoid stale CPU util_est value for schedutil in task dequeue

2020-12-18 Thread Xuewen Yan
From: Xuewen Yan CPU (root cfs_rq) estimated utilization (util_est) is currently used in dequeue_task_fair() to drive frequency selection before it is updated. with: CPU_util: rq->cfs.avg.util_avg CPU_util_est: rq->cfs.avg.util_est CPU_utilization : max(CPU_util, CPU_ut

[PATCH v3] sched/fair: Avoid stale CPU util_est value for schedutil in task dequeue

2020-12-18 Thread Xuewen Yan
From: Xuewen Yan CPU (root cfs_rq) estimated utilization (util_est) is currently used in dequeue_task_fair() to drive frequency selection before it is updated. with: CPU_util: rq->cfs.avg.util_avg CPU_util_est: rq->cfs.avg.util_est CPU_utilization : max(CPU_util, CPU_ut

[PATCH v2] fair/util_est: fix schedutil may use an old util_est.enqueued value at dequeue

2020-12-15 Thread Xuewen Yan
From: Xuewen Yan when a task dequeued, it would update it's util and cfs_rq's util, the following calling relationship exists here: update_load_avg() -> cfs_rq_util_change() -> cpufreq_update_util()-> sugov_update_[shared\|single] -> sugov_get_util() -> cpu_util_cfs();

Re: [PATCH] fair/util_est: Separate util_est_dequeue() for cfs_rq_util_change

2020-12-15 Thread Xuewen Yan
the load is updated, the cpu may always maintain a high frequency. if keep the util_est_dequeue as it is, are there other concerns, or this patch would affect other places of system? > > > > If I would run with your patch cpu_util_cfs() would chose between 597 and 0 > >

[PATCH] fair/util_est: Separate util_est_dequeue() for cfs_rq_util_change

2020-12-09 Thread Xuewen Yan
a result, cfs_rq_util_change may change freq unreasonablely. separate the util_est_dequeue() into util_est_dequeue() and util_est_update(), and dequeue the _task_util_est(p) before update util. Signed-off-by: Xuewen Yan --- kernel/sched/fair.c | 24 +++- 1 file changed, 19 i

[PATCH v3] sched: revise the initial value of the util_avg.

2020-11-05 Thread Xuewen Yan
gt;avg.util_avg so the must be extremely small, the cfs_rq->avg.load_avg judgment condition "sa->util_avg < cap" could be established. It's not fair for those tasks who has smaller nice value. Signed-off-by: Xuewen Yan --- changes since V2: *ke

答复: [PATCH v2] sched: revise the initial value of the util_avg.

2020-11-05 Thread Xuewen Yan
se->load.weight. Thanks! 发件人: Vincent Guittot 发送时间: 2020年11月5日 20:30 收件人: 闫学文 (Xuewen Yan) 抄送: Ingo Molnar; Peter Zijlstra; Juri Lelli; Dietmar Eggemann; Steven Rostedt; Ben Segall; Mel Gorman; Daniel Bristot de Oliveira; linux-kernel; xuewen.ya...@gmail.co

[PATCH v2] sched: revise the initial value of the util_avg.

2020-11-05 Thread Xuewen Yan
gt;avg.util_avg so the must be extremely small, the cfs_rq->avg.load_avg judgment condition "sa->util_avg < cap" could be established. It's not fair for those tasks who has smaller nice value. Signed-off-by: Xuewen Yan --- kernel/sched/fair.c | 6 +- 1 file

[PATCH v2] sched: sched_domain fix highest_flag_domain function

2020-10-26 Thread Xuewen Yan
flag; In DIE domain : containing SD_ASYM_CPUCAPACITY flag; the "highest_flag_domain(cpu, SD_ASYM_CPUCAPACITY)" will return NULL. Signed-off-by: Xuewen Yan --- kernel/sched/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/sched.h b/kernel/sch