From: "tip-bot2 for Tianchen Ding" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Abel Wu <wuyun.abel@bytedance.com>,
Tianchen Ding <dtcccc@linux.alibaba.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
K Prateek Nayak <kprateek.nayak@amd.com>,
Chen Yu <yu.c.chen@intel.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/urgent] sched/eevdf: Always update V if se->on_rq when reweighting
Date: Mon, 22 Apr 2024 11:39:34 -0000 [thread overview]
Message-ID: <171378597469.10875.9133852696892913685.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20240306022133.81008-2-dtcccc@linux.alibaba.com>
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@linux.alibaba.com>
AuthorDate: Wed, 06 Mar 2024 10:21:32 +08:00
Committer: Peter Zijlstra <peterz@infradead.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@bytedance.com>
Signed-off-by: Tianchen Ding <dtcccc@linux.alibaba.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Abel Wu <wuyun.abel@bytedance.com>
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Tested-by: Chen Yu <yu.c.chen@intel.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);
}
next prev parent reply other threads:[~2024-04-22 11:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 2:21 [PATCH v2 0/2] sched/eevdf: Minor fixes for reweight_entity() Tianchen Ding
2024-03-06 2:21 ` [PATCH v2 1/2] sched/eevdf: Always update V if se->on_rq when reweighting Tianchen Ding
2024-03-06 3:06 ` Abel Wu
2024-04-22 11:39 ` tip-bot2 for Tianchen Ding [this message]
2024-03-06 2:21 ` [PATCH v2 2/2] sched/eevdf: Fix miscalculation in reweight_entity() when se is not curr Tianchen Ding
2024-04-22 11:39 ` [tip: sched/urgent] " tip-bot2 for Tianchen Ding
2024-03-13 6:24 ` [PATCH v2 0/2] sched/eevdf: Minor fixes for reweight_entity() K Prateek Nayak
2024-04-08 3:24 ` Tianchen Ding
2024-04-19 7:27 ` Chen Yu
2024-04-19 8:02 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=171378597469.10875.9133852696892913685.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=dtcccc@linux.alibaba.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=wuyun.abel@bytedance.com \
--cc=x86@kernel.org \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®