linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Juri Lelli <juri.lelli@redhat.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Leonard Crestez <leonard.crestez@nxp.com>,
	Patrick Bellasi <patrick.bellasi@arm.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Anson Huang <anson.huang@nxp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	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 11:54:51 +0100	[thread overview]
Message-ID: <20180110105451.GB16413@localhost.localdomain> (raw)
In-Reply-To: <CAJZ5v0gV_4y1rKio9QRP_-M65rXtQHi2W3O22uiXJ08oafVtOw@mail.gmail.com>

On 09/01/18 16:50, Rafael J. Wysocki wrote:
> On Tue, Jan 9, 2018 at 3:43 PM, Leonard Crestez <leonard.crestez@nxp.com> wrote:

[...]

> > Every 4 seconds (really it's /proc/sys/kernel/watchdog_thresh * 2 / 5
> > and watchdog_thresh defaults to 10). There is a per-cpu hrtimer which
> > wakes the per-cpu thread in order to check that tasks can still
> > execute, this works very well against bugs like infinite loops in
> > softirq mode. The timers are synchronized initially but can get
> > staggered (for example by hotplug).
> >
> > My guess is that it's only marked RT so that it executes ahead of other
> > threads and the watchdog doesn't trigger simply when there are lots of
> > userspace tasks.
> 
> I think so too.
> 
> I see a couple of more-or-less hackish ways to avoid the issue, but
> nothing particularly attractive ATM.
> 
> I wouldn't change the general behavior with respect to RT tasks
> because of this, though, as we would quickly find a case in which that
> would turn out to be not desirable.

I agree we cannot generalize to all RT tasks, but what Patrick proposed
(clamping utilization of certain known tasks) might help here:

lkml.kernel.org/r/20170824180857.32103-1-patrick.bellasi@arm.com

Maybe with a per-task interface instead of using cgroups?

The other option would be to relax DL tasks affinity constraints, so
that a case like this might be handled. Daniel and Tommaso proposed
possible approaches, this might be a driving use case. Not sure how we
would come up with a proper runtime for the watchdog, though.

Best,

- Juri

  reply	other threads:[~2018-01-10 10:54 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 [this message]
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
  -- 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=20180110105451.GB16413@localhost.localdomain \
    --to=juri.lelli@redhat.com \
    --cc=anson.huang@nxp.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 \
    --cc=viresh.kumar@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;
as well as URLs for NNTP newsgroup(s).