mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Clark Williams <williams@redhat.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	John Kacur <jkacur@redhat.com>, Scott Wood <swood@redhat.com>,
	Mike Galbraith <efault@gmx.de>
Subject: [PATCH RT] fix IPI balancing for 4.14-rt
Date: Tue, 21 Nov 2017 09:14:25 -0600	[thread overview]
Message-ID: <20171121091425.7577dc02@tagon> (raw)
In-Reply-To: <20171006140504.48dc32c1@gandalf.local.home>

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

From 8ea8311b75a40bdea03e7f8228a0578b6367e9d1 Mon Sep 17 00:00:00 2001
From: Clark Williams <williams@redhat.com>
Date: Mon, 20 Nov 2017 14:26:12 -0600
Subject: [PATCH] [rt] sched/rt: fix panic in double_lock_balance with
 simplified IPI RT balancing

I was testing 4.14-rt1 on a large system (cores == 96) and saw that
we were getting into an rt balancing storm, so I tried applying Steven's
patch (not upstream yet):

    sched/rt: Simplify the IPI rt balancing logic

Booting the resulting kernel yielded a panic in
double_lock_balance() due to irqs not being disabled.

This patch changes the calls to raw_spin_{lock,unlock} in the
function rto_push_irq_work_function, to be raw_spin_{lock,unlock}_irq.
Not sure if that's too heavy a hammer, but the resulting kernel boots
and runs and survives 12h runs of rteval. Once Steven's patch goes in 
upstream, we'll need something like this in RT.

Signed-off-by: Clark Williams <williams@redhat.com>
---
 kernel/sched/rt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 57fb251dd8ce..a5cd0cea2f0f 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -2008,9 +2008,9 @@ void rto_push_irq_work_func(struct irq_work *work)
 	 * When it gets updated, a check is made if a push is possible.
 	 */
 	if (has_pushable_tasks(rq)) {
-		raw_spin_lock(&rq->lock);
+		raw_spin_lock_irq(&rq->lock);
 		push_rt_tasks(rq);
-		raw_spin_unlock(&rq->lock);
+		raw_spin_unlock_irq(&rq->lock);
 	}
 
 	raw_spin_lock(&rq->rd->rto_lock);
-- 
2.14.3



-- 
The United States Coast Guard
Ruining Natural Selection since 1790

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-11-21 15:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06 18:05 [PATCH tip/sched/core v3] sched/rt: Simplify the IPI rt balancing logic Steven Rostedt
2017-11-21 15:14 ` Clark Williams [this message]
2017-11-21 15:24   ` [PATCH RT] fix IPI balancing for 4.14-rt Steven Rostedt
2017-11-23 17:25     ` Sebastian Andrzej Siewior
2017-11-27 22:25       ` Steven Rostedt
2017-11-28  8:31         ` Sebastian Andrzej Siewior
2017-11-28 15:32           ` Steven Rostedt

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=20171121091425.7577dc02@tagon \
    --to=williams@redhat.com \
    --cc=bigeasy@linutronix.de \
    --cc=bristot@redhat.com \
    --cc=efault@gmx.de \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=swood@redhat.com \
    --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

Powered by JetHome