From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: Marco Crivellari <marco.crivellari@suse.com>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
Anna-Maria Behnsen <anna-maria@linutronix.de>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Huacai Chen <chenhuacai@kernel.org>,
"Maciej W . Rozycki" <macro@orcam.me.uk>
Subject: Re: [PATCH v6 1/1] MIPS: Fix idle VS timer enqueue
Date: Wed, 19 Mar 2025 15:42:16 +0100 [thread overview]
Message-ID: <Z9rXyGQZFSIgvQrh@alpha.franken.de> (raw)
In-Reply-To: <Z9rPVHop5Ob5nAdc@p200300d06f3e987545685175b554ae65.dip0.t-ipconnect.de>
On Wed, Mar 19, 2025 at 03:06:12PM +0100, Frederic Weisbecker wrote:
> Le Wed, Mar 19, 2025 at 12:07:07PM +0100, Thomas Bogendoerfer a écrit :
> > On Sat, Mar 15, 2025 at 08:40:02PM +0100, Marco Crivellari wrote:
> > > MIPS re-enables interrupts on its idle routine and performs
> > > a TIF_NEED_RESCHED check afterwards before putting the CPU to sleep.
> > >
> > > The IRQs firing between the check and the 'wait' instruction may set the
> > > TIF_NEED_RESCHED flag. In order to deal with this possible race, IRQs
> > > interrupting __r4k_wait() rollback their return address to the
> > > beginning of __r4k_wait() so that TIF_NEED_RESCHED is checked
> > > again before going back to sleep.
> > >
> > > However idle IRQs can also queue timers that may require a tick
> > > reprogramming through a new generic idle loop iteration but those timers
> > > would go unnoticed here because __r4k_wait() only checks
> > > TIF_NEED_RESCHED. It doesn't check for pending timers.
> >
> > can you give a commit ID, when this change got introduced ?
>
> That would be:
>
> Fixes: c65a5480ff29 ("[MIPS] Fix potential latency problem due to non-atomic cpu_wait.")
hmm, so even then checking TIF_NEED_RESCHED wasn't enough (we are talking
about 2.6.27) ?
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
next prev parent reply other threads:[~2025-03-19 14:42 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-15 19:40 [PATCH v6 0/1] MIPS: Fix idle VS timer enqueue Marco Crivellari
2025-03-15 19:40 ` [PATCH v6 1/1] " Marco Crivellari
2025-03-19 11:07 ` Thomas Bogendoerfer
2025-03-19 14:06 ` Frederic Weisbecker
2025-03-19 14:42 ` Thomas Bogendoerfer [this message]
2025-03-19 15:01 ` Frederic Weisbecker
2025-03-19 14:43 ` Frederic Weisbecker
2025-03-19 15:31 ` Thomas Bogendoerfer
2025-03-20 8:44 ` Marco Crivellari
2025-03-21 9:38 ` Thomas Bogendoerfer
2025-03-21 10:44 ` Marco Crivellari
2025-03-21 11:17 ` Thomas Bogendoerfer
2025-03-21 11:55 ` Maciej W. Rozycki
2025-03-21 11:53 ` Maciej W. Rozycki
2025-03-21 16:15 ` Marco Crivellari
2025-03-21 20:11 ` Maciej W. Rozycki
2025-03-25 14:08 ` Marco Crivellari
2025-03-26 1:20 ` Huacai Chen
2025-03-26 9:46 ` Marco Crivellari
2025-03-26 11:34 ` Thomas Bogendoerfer
2025-03-26 16:01 ` Maciej W. Rozycki
2025-03-28 10:42 ` Maciej W. Rozycki
2025-03-28 14:18 ` Maciej W. Rozycki
2025-03-31 10:11 ` Marco Crivellari
2025-03-31 20:09 ` Maciej W. Rozycki
2025-04-01 9:31 ` Jiaxun Yang
2025-04-02 11:42 ` Marco Crivellari
2025-04-03 12:00 ` Maciej W. Rozycki
2025-04-03 13:01 ` Marco Crivellari
2025-04-03 20:17 ` Maciej W. Rozycki
2025-04-04 3:18 ` Marco Crivellari
2025-03-21 21:09 ` Frederic Weisbecker
2025-03-22 16:08 ` Maciej W. Rozycki
2025-03-25 13:31 ` Frederic Weisbecker
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=Z9rXyGQZFSIgvQrh@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=anna-maria@linutronix.de \
--cc=chenhuacai@kernel.org \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=macro@orcam.me.uk \
--cc=marco.crivellari@suse.com \
--cc=peterz@infradead.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