mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nam Cao <namcao@linutronix.de>
To: "Clément Léger" <cleger@rivosinc.com>
Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	aou@eecs.berkeley.edu, Alexandre Ghiti <alex@ghiti.fr>,
	bigeasy@linutronix.de, clrkwllms@kernel.org, rostedt@goodmis.org,
	linux-rt-devel@lists.linux.dev, linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] riscv: Enable interrupt during exception handling
Date: Tue, 24 Jun 2025 15:17:30 +0200	[thread overview]
Message-ID: <20250624131730.XqPd1HUR@linutronix.de> (raw)
In-Reply-To: <19cf2371-7293-4e71-a17d-669db4c8270a@rivosinc.com>

On Tue, Jun 24, 2025 at 01:37:13PM +0200, Clément Léger wrote:
> On 24/06/2025 04:09, Maciej W. Rozycki wrote:
> > On Mon, 23 Jun 2025, Palmer Dabbelt wrote:
> >> I'm kind of split on a Fixes tag here.  One could argue it's a regression, as
> >> having interrupts disabled during exceptions is going to cause all sorts of
> >> performance issues for users.  Seems a bit risk to just backport, though...
> >>
> >> That said, if nobody noticed then it's probably a good sign nobody is really
> >> paying attention and we should just backport it before anyone notices...
> > 
> >  Oh, someone did notice and it's not only performance, cf. 
> > <https://lore.kernel.org/r/alpine.DEB.2.21.2501070143250.18889@angie.orcam.me.uk/>.
> 
> I also had a series which was doing so for misaligned accesses handling,
> but after discussion, it was not ok to do so.:
> 
> https://lore.kernel.org/linux-riscv/20250422094419.GC14170@noisy.programming.kicks-ass.net/

If I understand that right, exceptions from kernel should be treated as
NMI, so that lockdep can tell us if exception handlers touch locks.

But (conditionally) enabling interrupts does not lose us that benefit. It
is still considered NMI by lockdep.

Unless I miss something, the patch is fine as is.

Best regards,
Nam

  reply	other threads:[~2025-06-24 13:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-20 11:43 Nam Cao
2025-06-23 22:17 ` Palmer Dabbelt
2025-06-24  2:09   ` Maciej W. Rozycki
2025-06-24 11:37     ` Clément Léger
2025-06-24 13:17       ` Nam Cao [this message]
2025-06-24 13:48         ` Clément Léger
2025-06-24 14:08           ` Peter Zijlstra
2025-06-24 14:11             ` Sebastian Andrzej Siewior
2025-06-24 14:18               ` Peter Zijlstra
2025-06-24 14:23                 ` Sebastian Andrzej Siewior
2025-06-24 14:34                   ` Peter Zijlstra
2025-06-24 15:33                     ` Nam Cao
2025-06-24 18:51                       ` Peter Zijlstra

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=20250624131730.XqPd1HUR@linutronix.de \
    --to=namcao@linutronix.de \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=bigeasy@linutronix.de \
    --cc=cleger@rivosinc.com \
    --cc=clrkwllms@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=macro@orcam.me.uk \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rostedt@goodmis.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®