Patch "sched/fair: Use recent_used_cpu to test p->cpus_ptr" has been added to the 6.4-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/fair: Use recent_used_cpu to test p->cpus_ptr

to the 6.4-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-fair-use-recent_used_cpu-to-test-p-cpus_ptr.patch
and it can be found in the queue-6.4 subdirectory.

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



commit eb7afb14a34b80e0302a1d23d86f4850e5a83b66
Author: Miaohe Lin <linmiaohe@xxxxxxxxxx>
Date:   Tue Jun 20 16:07:47 2023 +0800

    sched/fair: Use recent_used_cpu to test p->cpus_ptr
    
    [ Upstream commit ae2ad293d6be143ad223f5f947cca07bcbe42595 ]
    
    When checking whether a recently used CPU can be a potential idle
    candidate, recent_used_cpu should be used to test p->cpus_ptr as
    p->recent_used_cpu is not equal to recent_used_cpu and candidate
    decision is made based on recent_used_cpu here.
    
    Fixes: 89aafd67f28c ("sched/fair: Use prev instead of new target as recent_used_cpu")
    Signed-off-by: Miaohe Lin <linmiaohe@xxxxxxxxxx>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
    Reviewed-by: Phil Auld <pauld@xxxxxxxxxx>
    Acked-by: Mel Gorman <mgorman@xxxxxxx>
    Link: https://lore.kernel.org/r/20230620080747.359122-1-linmiaohe@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index e427056b440bb..dacb56d7e9147 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7174,7 +7174,7 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)
 	    recent_used_cpu != target &&
 	    cpus_share_cache(recent_used_cpu, target) &&
 	    (available_idle_cpu(recent_used_cpu) || sched_idle_cpu(recent_used_cpu)) &&
-	    cpumask_test_cpu(p->recent_used_cpu, p->cpus_ptr) &&
+	    cpumask_test_cpu(recent_used_cpu, p->cpus_ptr) &&
 	    asym_fits_cpu(task_util, util_min, util_max, recent_used_cpu)) {
 		return recent_used_cpu;
 	}



[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