linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched/pelt: Add UTIL_AVG_UNCHANGED flag for last_enqueued_diff
@ 2021-05-06 11:09 Xuewen Yan
  2021-05-06 12:28 ` Vincent Donnefort
  0 siblings, 1 reply; 7+ messages in thread
From: Xuewen Yan @ 2021-05-06 11:09 UTC (permalink / raw)
  To: vincent.donnefort, mingo, peterz, juri.lelli, vincent.guittot,
	dietmar.eggemann
  Cc: rostedt, bsegall, mgorman, bristot, linux-kernel, zhang.lyra, xuewyan

From: Xuewen Yan <xuewen.yan@unisoc.com>

The UTIL_AVG_UNCHANGED flag had been cleared when the task util changed.
And the enqueued is equal to task_util with the flag, so it is better
to add the UTIL_AVG_UNCHANGED flag for last_enqueued_diff.

Fixes: b89997aa88f0b sched/pelt: Fix task util_est update filtering

Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index e5e457fa9dc8..94d77b4fa601 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3996,7 +3996,7 @@ static inline void util_est_update(struct cfs_rq *cfs_rq,
 	if (ue.enqueued & UTIL_AVG_UNCHANGED)
 		return;
 
-	last_enqueued_diff = ue.enqueued;
+	last_enqueued_diff = (ue.enqueued | UTIL_AVG_UNCHANGED);
 
 	/*
 	 * Reset EWMA on utilization increases, the moving average is used only
-- 
2.29.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-07 10:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 11:09 [PATCH] sched/pelt: Add UTIL_AVG_UNCHANGED flag for last_enqueued_diff Xuewen Yan
2021-05-06 12:28 ` Vincent Donnefort
2021-05-06 12:46   ` Xuewen Yan
2021-05-06 16:26     ` Vincent Donnefort
2021-05-07  1:34       ` Xuewen Yan
2021-05-07  6:53         ` Vincent Guittot
2021-05-07 10:26           ` Xuewen Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).