All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Daniel Bristot de Oliveira <bristot@redhat.com>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Bruno Goncalves <bgoncalv@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/deadline: Fix missing clock update in migrate_task_rq_dl()
Date: Thu, 5 Aug 2021 11:35:44 +0200	[thread overview]
Message-ID: <20210805093544.GC22037@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <57f2dfe5-c1f5-4efb-e565-2e174228ee9a@redhat.com>

On Thu, Aug 05, 2021 at 10:16:26AM +0200, Daniel Bristot de Oliveira wrote:
> On 8/4/21 3:59 PM, Dietmar Eggemann wrote:
> > 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@redhat.com>
> > Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
> 
> Reviewed-by: Daniel Bristot de Oliveira <bristot@kernel.org>

Thanks!

  reply	other threads:[~2021-08-05  9:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 13:59 [PATCH] sched/deadline: Fix missing clock update in migrate_task_rq_dl() Dietmar Eggemann
2021-08-05  8:16 ` Daniel Bristot de Oliveira
2021-08-05  9:35   ` Peter Zijlstra [this message]
2021-08-05  9:40 ` Juri Lelli
2021-08-06 12:57 ` [tip: sched/core] " tip-bot2 for Dietmar Eggemann

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=20210805093544.GC22037@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bgoncalv@redhat.com \
    --cc=bristot@redhat.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.