From: Rik van Riel <riel@surriel.com>
To: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Thomas Gleixner <tglx@kernel.org>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] smp: prevent soft lockup in smp_call_function_many_cond
Date: Tue, 02 Jun 2026 21:37:03 -0400 [thread overview]
Message-ID: <5d88d3b1bd02b6583d8b66eedd9bf1fd96e6e788.camel@surriel.com> (raw)
In-Reply-To: <20260527031618.2940365-1-mark.tomlinson@alliedtelesis.co.nz>
On Wed, 2026-05-27 at 15:16 +1200, Mark Tomlinson wrote:
> Using the PowerPC P2040 (e500mc) CPU, soft lockups can occasionally
> be
> seen in smp_call_function_many_cond(). The conclusion is that this
> CPU
> does not process the doorbell interrupt while in a data-storage (MMU)
> exception. If more than one CPU in a multi core environment is
> calling
> this function at the same time, it is possible for a deadlock to
> occur.
Does that mean if the CPU in question does not call
smp_call_function_many_cond() while in a data-storage
exception, the system might still hang?
Not that there's anything wrong with reducing the
frequency of what is (presumably) an already pretty
rare hang.
>
> The fix for this is to call flush_smp_call_function_queue() before
> waiting for responses from other CPUs. If there is something in the
> queue, this is a good time to process it before busy-waiting on other
> CPUs. On other architectures this call will quickly do nothing, as
> the
> queue will be empty.
Agreed, this does look completely harmless at worst,
and does look like it would at the very least improve
that e500mc issue.
>
> Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
>
Reviewed-by: Rik van Riel <riel@surriel.com>
--
All Rights Reversed.
prev parent reply other threads:[~2026-06-03 1:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 3:16 Mark Tomlinson
2026-06-02 21:18 ` Chris Packham
2026-06-04 17:52 ` Paul E. McKenney
2026-06-03 1:37 ` Rik van Riel [this message]
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=5d88d3b1bd02b6583d8b66eedd9bf1fd96e6e788.camel@surriel.com \
--to=riel@surriel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mark.tomlinson@alliedtelesis.co.nz \
--cc=tglx@kernel.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
all inboxes | Powered by JetHome®