Linux Power Management development
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Leonard Crestez <leonard.crestez@nxp.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Patrick Bellasi <patrick.bellasi@arm.com>,
	Linux PM <linux-pm@vger.kernel.org>,
	Anson Huang <anson.huang@nxp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Vincent Guittot <vincent.guittot@linaro.org>
Subject: Re: [BUG] schedutil governor produces regular max freq spikes because of lockup detector watchdog threads
Date: Wed, 10 Jan 2018 09:38:29 +0530	[thread overview]
Message-ID: <20180110040829.GB3335@vireshk-i7> (raw)
In-Reply-To: <1515508985.3310.8.camel@nxp.com>

On 09-01-18, 16:43, Leonard Crestez wrote:
> What I am saying is that as far as I can tell when cpufreq_update_util
> is called when the task has already executed and is been switched out.

Can you check if this patch makes it any better ?

https://marc.info/?l=linux-kernel&m=151204248901636&w=2

> My tests are not very elaborate but based on some ftracing it seems to
> me that the current behavior is for cpufreq spikes to always trail RT
> activity. Like this:
> 
>           <idle>-0     [002]   496.510138: sched_switch:         swapper/2:0 [120] S ==> watchdog/2:20 [0]
>       watchdog/2-20    [002]   496.510156: bprint:               watchdog: IN watchdog(2)
>       watchdog/2-20    [002]   496.510364: bprint:               watchdog: OU watchdog(2)
>       watchdog/2-20    [002]   496.510377: bprint:               update_curr_rt: watchdog kick RT! cpu=2 comm=watchdog/2

Probabl update_curr_rt is getting called a bit after the task has
already run. The above patch moves the call to cpufreq_update_util()
to enqueue/dequeue paths and that should fix it.

-- 
viresh

  parent reply	other threads:[~2018-01-10  4:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 20:37 [BUG] schedutil governor produces regular max freq spikes because of lockup detector watchdog threads Leonard Crestez
2018-01-05 22:18 ` Rafael J. Wysocki
2018-01-08  4:01   ` Viresh Kumar
2018-01-08 13:10     ` Rafael J. Wysocki
2018-01-08 13:20     ` Leonard Crestez
2018-01-08 15:14       ` Patrick Bellasi
2018-01-08 15:51         ` Leonard Crestez
2018-01-09  1:17           ` Rafael J. Wysocki
2018-01-09 14:43             ` Leonard Crestez
2018-01-09 15:16               ` Lucas Stach
2018-01-09 15:50               ` Rafael J. Wysocki
2018-01-10 10:54                 ` Juri Lelli
2018-01-10 12:35                   ` Rafael J. Wysocki
2018-01-10 14:21                     ` Juri Lelli
2018-01-11  1:20                       ` Rafael J. Wysocki
2018-01-10  4:08               ` Viresh Kumar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-01-06 16:12 Doug Smythies

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=20180110040829.GB3335@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=anson.huang@nxp.com \
    --cc=juri.lelli@redhat.com \
    --cc=leonard.crestez@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=patrick.bellasi@arm.com \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox