All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: sched_core_balance() releasing interrupts with pi_lock held
Date: Wed, 16 Mar 2022 21:27:34 +0100	[thread overview]
Message-ID: <20220316202734.GJ8939@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20220315174606.02959816@gandalf.local.home>

On Tue, Mar 15, 2022 at 05:46:06PM -0400, Steven Rostedt wrote:
> On Tue, 8 Mar 2022 16:14:55 -0500
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > Hi Peter,
> 
> Have you had time to look into this?

Not since I talk to you on IRC about it last week.

Like I wrote, the balance_callback should be ran under whichever
rq->lock instance it gets queued under. As per:

  565790d28b1e ("sched: Fix balance_callback()")

Now, we only do queue_core_balance() from set_next_task_idle(), which
*should* only happen from pick_next_task(), and as such the callback
should only ever get called from finish_lock_switch() or the 'prev ==
next' case in __schedule().

Neither of these two sites holds pi_lock.


This is about as far as I got explaining things, and it being late, it's
about as far as I got looking at things.

Now that also makes conceptual sense, we only want to pull a core-cookie
task when we're scheduling an idle task.

Now, clearly this gets triggered from the PI path, but that's not making
immediate sense to me, it would mean we're boosting the idle task, which
is wrong too.

So it would be useful for someone that can reproduce this to provide a
trace of where queue_core_balance() gets called, because that *should*
only be in __schedule().

  parent reply	other threads:[~2022-03-16 20:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 21:14 sched_core_balance() releasing interrupts with pi_lock held Steven Rostedt
2022-03-15 21:46 ` Steven Rostedt
2022-03-16 16:03   ` Sebastian Andrzej Siewior
2022-03-16 16:18     ` Sebastian Andrzej Siewior
2022-03-16 17:05       ` Sebastian Andrzej Siewior
2022-03-16 20:35       ` Peter Zijlstra
2022-03-17 12:09         ` Sebastian Andrzej Siewior
2022-03-17 14:51           ` [PATCH] sched: Teach the forced-newidle balancer about CPU affinity limitation Sebastian Andrzej Siewior
2022-04-05  8:22             ` [tip: sched/urgent] " tip-bot2 for Sebastian Andrzej Siewior
2022-03-16 20:27   ` Peter Zijlstra [this message]
2022-03-16 21:03     ` sched_core_balance() releasing interrupts with pi_lock held Peter Zijlstra
2022-03-21 17:30       ` Steven Rostedt
2022-03-29 21:22         ` Steven Rostedt
2022-04-04 20:17           ` T.J. Alumbaugh
2022-04-05  7:48             ` Peter Zijlstra
2022-04-05 15:16               ` Dietmar Eggemann
2022-03-17 12:08     ` Sebastian Andrzej Siewior

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=20220316202734.GJ8939@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.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 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.