Patch "sched/eevdf: Always update V if se->on_rq when reweighting" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     sched-eevdf-always-update-v-if-se-on_rq-when-reweigh.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5852e7a236db40e4713f3bb6182b2d25bdc59803
Author: Tianchen Ding <dtcccc@xxxxxxxxxxxxxxxxx>
Date:   Wed Mar 6 10:21:32 2024 +0800

    sched/eevdf: Always update V if se->on_rq when reweighting
    
    [ Upstream commit 11b1b8bc2b98e21ddf47e08b56c21502c685b2c3 ]
    
    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@xxxxxxxxxxxxx>
    Signed-off-by: Tianchen Ding <dtcccc@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
    Reviewed-by: Abel Wu <wuyun.abel@xxxxxxxxxxxxx>
    Tested-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
    Tested-by: Chen Yu <yu.c.chen@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20240306022133.81008-2-dtcccc@xxxxxxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 69fe62126a28e..71e7cf6f77f65 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3740,9 +3740,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);
 	}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux