Patch "sched/deadline: Fix missing clock update in migrate_task_rq_dl()" has been added to the 5.14-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/deadline: Fix missing clock update in migrate_task_rq_dl()

to the 5.14-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-deadline-fix-missing-clock-update-in-migrate_t.patch
and it can be found in the queue-5.14 subdirectory.

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



commit e0b44b280eed0148117815827b4fd913129e32d8
Author: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
Date:   Wed Aug 4 15:59:25 2021 +0200

    sched/deadline: Fix missing clock update in migrate_task_rq_dl()
    
    [ Upstream commit b4da13aa28d4fd0071247b7b41c579ee8a86c81a ]
    
    A missing clock update is causing the following warning:
    
    rq->clock_update_flags < RQCF_ACT_SKIP
    WARNING: CPU: 112 PID: 2041 at kernel/sched/sched.h:1453
    sub_running_bw.isra.0+0x190/0x1a0
    ...
    CPU: 112 PID: 2041 Comm: sugov:112 Tainted: G W 5.14.0-rc1 #1
    Hardware name: WIWYNN Mt.Jade Server System
    B81.030Z1.0007/Mt.Jade Motherboard, BIOS 1.6.20210526 (SCP:
    1.06.20210526) 2021/05/26
    ...
    Call trace:
      sub_running_bw.isra.0+0x190/0x1a0
      migrate_task_rq_dl+0xf8/0x1e0
      set_task_cpu+0xa8/0x1f0
      try_to_wake_up+0x150/0x3d4
      wake_up_q+0x64/0xc0
      __up_write+0xd0/0x1c0
      up_write+0x4c/0x2b0
      cppc_set_perf+0x120/0x2d0
      cppc_cpufreq_set_target+0xe0/0x1a4 [cppc_cpufreq]
      __cpufreq_driver_target+0x74/0x140
      sugov_work+0x64/0x80
      kthread_worker_fn+0xe0/0x230
      kthread+0x138/0x140
      ret_from_fork+0x10/0x18
    
    The task causing this is the `cppc_fie` DL task introduced by
    commit 1eb5dde674f5 ("cpufreq: CPPC: Add support for frequency
    invariance").
    
    With CONFIG_ACPI_CPPC_CPUFREQ_FIE=y and schedutil cpufreq governor on
    slow-switching system (like on this Ampere Altra WIWYNN Mt. Jade Arm
    Server):
    
    DL task `curr=sugov:112` lets `p=cppc_fie` migrate and since the latter
    is in `non_contending` state, migrate_task_rq_dl() calls
    
      sub_running_bw()->__sub_running_bw()->cpufreq_update_util()->
      rq_clock()->assert_clock_updated()
    
    on p.
    
    Fix this by updating the clock for a non_contending task in
    migrate_task_rq_dl() before calling sub_running_bw().
    
    Reported-by: Bruno Goncalves <bgoncalv@xxxxxxxxxx>
    Signed-off-by: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
    Reviewed-by: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>
    Acked-by: Juri Lelli <juri.lelli@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210804135925.3734605-1-dietmar.eggemann@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 5cafc642e647..e94314633b39 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1733,6 +1733,7 @@ static void migrate_task_rq_dl(struct task_struct *p, int new_cpu __maybe_unused
 	 */
 	raw_spin_rq_lock(rq);
 	if (p->dl.dl_non_contending) {
+		update_rq_clock(rq);
 		sub_running_bw(&p->dl, &rq->dl);
 		p->dl.dl_non_contending = 0;
 		/*



[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