From: Steven Rostedt <rostedt@goodmis.org>
To: Mike Galbraith <efault@gmx.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
linux-rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: [patch-rt] sched,fair: Fix CFS bandwidth control lockdep DEADLOCK report
Date: Fri, 4 May 2018 10:48:02 -0400 [thread overview]
Message-ID: <20180504104802.33e9a52f@gandalf.local.home> (raw)
In-Reply-To: <1525414478.6761.5.camel@gmx.de>
On Fri, 04 May 2018 08:14:38 +0200
Mike Galbraith <efault@gmx.de> wrote:
> CFS bandwidth control yields the inversion gripe below, moving
> handling quells it.
>
> ========================================================
> WARNING: possible irq lock inversion dependency detected
> 4.16.7-rt1-rt #2 Tainted: G E
> --------------------------------------------------------
> sirq-hrtimer/0/15 just changed the state of lock:
> (&cfs_b->lock){+...}, at: [<000000009adb5cf7>] sched_cfs_period_timer+0x28/0x140
> but this lock was taken by another, HARDIRQ-safe lock in the past:
> (&rq->lock){-...}
> and interrupts could create inverse lock ordering between them.
> other info that might help us debug this:
> Possible interrupt unsafe locking scenario:
> CPU0 CPU1
> ---- ----
> lock(&cfs_b->lock);
> local_irq_disable();
> lock(&rq->lock);
> lock(&cfs_b->lock);
> <Interrupt>
> lock(&rq->lock);
> *** DEADLOCK ***
> Signed-off-by: Mike Galbraith <efault@gmx.de>
> ---
> kernel/sched/fair.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -5007,9 +5007,9 @@ void init_cfs_bandwidth(struct cfs_bandw
> cfs_b->period = ns_to_ktime(default_cfs_period());
>
> INIT_LIST_HEAD(&cfs_b->throttled_cfs_rq);
> - hrtimer_init(&cfs_b->period_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED);
> + hrtimer_init(&cfs_b->period_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
> cfs_b->period_timer.function = sched_cfs_period_timer;
> - hrtimer_init(&cfs_b->slack_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
> + hrtimer_init(&cfs_b->slack_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
Looks good to me.
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-- Steve
> cfs_b->slack_timer.function = sched_cfs_slack_timer;
> }
>
next prev parent reply other threads:[~2018-05-04 14:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 16:29 [ANNOUNCE] v4.16.7-rt1 Sebastian Andrzej Siewior
2018-05-04 6:14 ` [patch-rt] sched,fair: Fix CFS bandwidth control lockdep DEADLOCK report Mike Galbraith
2018-05-04 14:48 ` Steven Rostedt [this message]
2018-05-15 16:45 ` Sebastian Andrzej Siewior
2018-05-09 21:45 ` [ANNOUNCE] v4.16.7-rt1 Bernhard Landauer
2018-05-09 22:24 ` Bernhard Landauer
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=20180504104802.33e9a52f@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=bigeasy@linutronix.de \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=tglx@linutronix.de \
/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).