lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 22 Apr 2024 11:39:34 -0000
From: "tip-bot2 for Tianchen Ding" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Abel Wu <wuyun.abel@...edance.com>,
 Tianchen Ding <dtcccc@...ux.alibaba.com>,
 "Peter Zijlstra (Intel)" <peterz@...radead.org>,
 K Prateek Nayak <kprateek.nayak@....com>, Chen Yu <yu.c.chen@...el.com>,
 x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: sched/urgent] sched/eevdf: Always update V if se->on_rq when
 reweighting

The following commit has been merged into the sched/urgent branch of tip:

Commit-ID:     11b1b8bc2b98e21ddf47e08b56c21502c685b2c3
Gitweb:        https://git.kernel.org/tip/11b1b8bc2b98e21ddf47e08b56c21502c685b2c3
Author:        Tianchen Ding <dtcccc@...ux.alibaba.com>
AuthorDate:    Wed, 06 Mar 2024 10:21:32 +08:00
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Mon, 22 Apr 2024 13:01:26 +02:00

sched/eevdf: Always update V if se->on_rq when reweighting

reweight_eevdf() needs the latest V to do accurate calculation for new
ve and vd. So update V unconditionally when se is runnable.

Fixes: eab03c23c2a1 ("sched/eevdf: Fix vruntime adjustment on reweight")
Suggested-by: Abel Wu <wuyun.abel@...edance.com>
Signed-off-by: Tianchen Ding <dtcccc@...ux.alibaba.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Abel Wu <wuyun.abel@...edance.com>
Tested-by: K Prateek Nayak <kprateek.nayak@....com>
Tested-by: Chen Yu <yu.c.chen@...el.com>
Link: https://lore.kernel.org/r/20240306022133.81008-2-dtcccc@linux.alibaba.com
---
 kernel/sched/fair.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 03be0d1..5551ce2 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3790,9 +3790,8 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se,
 
 	if (se->on_rq) {
 		/* commit outstanding execution time */
-		if (curr)
-			update_curr(cfs_rq);
-		else
+		update_curr(cfs_rq);
+		if (!curr)
 			__dequeue_entity(cfs_rq, se);
 		update_load_sub(&cfs_rq->load, se->load.weight);
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ