Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-19 Thread Brad Boyer
On Sat, Feb 20, 2021 at 05:32:30PM +1100, Finn Thain wrote: > Nope. Interrupt priority masking is there to place an upper bound > interrupt latency. That's why this feature is shipping in contemporary > hardware (e.g. ARM GIC). If you care about real time workloads on arm64, > that may interest

Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-19 Thread Finn Thain
On Thu, 18 Feb 2021, Arnd Bergmann wrote: > On Thu, Feb 18, 2021 at 6:30 AM Finn Thain wrote: > > On Wed, 17 Feb 2021, Song Bao Hua (Barry Song) wrote: > > > > On Sat, 13 Feb 2021, Song Bao Hua (Barry Song) wrote: > > > > > > > > That scenario seems a little contrived to me (drivers for two or >

Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-19 Thread Brad Boyer
On Fri, Feb 19, 2021 at 09:10:57AM +0100, Geert Uytterhoeven wrote: > Hi Michael, > > On Thu, Feb 18, 2021 at 11:11 PM Michael Schmitz wrote: > > On 19/02/21 12:19 am, Arnd Bergmann wrote: > > > drivers/net/ethernet/8390/apne.c > > > drivers/net/ethernet/8390/ax88796.c > > > drivers/net/ethernet/

Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-19 Thread Geert Uytterhoeven
Hi Michael, On Thu, Feb 18, 2021 at 11:11 PM Michael Schmitz wrote: > On 19/02/21 12:19 am, Arnd Bergmann wrote: > > drivers/net/ethernet/8390/apne.c > > drivers/net/ethernet/8390/ax88796.c > > drivers/net/ethernet/8390/hydra.c > > drivers/net/ethernet/8390/mac8390.c > > drivers/net/ethernet/8390

Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-18 Thread Michael Schmitz
On 19/02/21 12:19 am, Arnd Bergmann wrote: drivers/net/ethernet/8390/apne.c drivers/net/ethernet/8390/ax88796.c drivers/net/ethernet/8390/hydra.c drivers/net/ethernet/8390/mac8390.c drivers/net/ethernet/8390/ne.c drivers/net/ethernet/8390/zorro8390.c [...] Most of these are normal short-lived

Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-18 Thread Geert Uytterhoeven
Hi Arnd, On Thu, Feb 18, 2021 at 2:59 PM Arnd Bergmann wrote: > On Thu, Feb 18, 2021 at 1:30 PM Geert Uytterhoeven > wrote: > > The reason drivers/ide is doing that may be related to IDE hard drive > > quirks. The old WD Caviar drives didn't obey disabling the IDE interrupt > > at the drive le

Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-18 Thread Arnd Bergmann
On Thu, Feb 18, 2021 at 1:30 PM Geert Uytterhoeven wrote: > > The reason drivers/ide is doing that may be related to IDE hard drive > quirks. The old WD Caviar drives didn't obey disabling the IDE interrupt > at the drive level. On PC, that worked fine, as IRQs 14 and 15 weren't > shared with ot

Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-18 Thread Geert Uytterhoeven
Hi Arnd, On Thu, Feb 18, 2021 at 12:20 PM Arnd Bergmann wrote: > Most of these are normal short-lived interrupts that only transfer > a few bytes or schedule deferred processing of some sort. > Most of the scsi and network drivers process the data in > a softirq, so those are generally fine here,

Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-18 Thread Arnd Bergmann
On Thu, Feb 18, 2021 at 6:30 AM Finn Thain wrote: > On Wed, 17 Feb 2021, Song Bao Hua (Barry Song) wrote: > > > On Sat, 13 Feb 2021, Song Bao Hua (Barry Song) wrote: > > > > > > That scenario seems a little contrived to me (drivers for two or more > > > devices sharing state through their interrup

RE: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-17 Thread Finn Thain
On Wed, 17 Feb 2021, Song Bao Hua (Barry Song) wrote: > > On Sat, 13 Feb 2021, Song Bao Hua (Barry Song) wrote: > > > > > > > > So what is really confusing and a pain to me is that: For years > > > people like me have been writing device drivers with the idea that > > > irq handlers run with in

RE: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-17 Thread Song Bao Hua (Barry Song)
fun...@jurai.org; ph...@gnu.org; cor...@lwn.net; mi...@redhat.com; > linux-m...@lists.linux-m68k.org; linux-kernel@vger.kernel.org > Subject: RE: [RFC] IRQ handlers run with some high-priority interrupts(not > NMI) > enabled on some platform > > On Sat, 13 Feb 2021, Song Bao Hua (B

Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-15 Thread Finn Thain
On Mon, 15 Feb 2021, Andy Shevchenko wrote: > On Sun, Feb 14, 2021 at 7:12 AM Finn Thain wrote: > > On Sat, 13 Feb 2021, Song Bao Hua (Barry Song) wrote: > > > So what is really confusing and a pain to me is that: > > > For years people like me have been writing device drivers > > > with the idea

Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-15 Thread Andy Shevchenko
On Sun, Feb 14, 2021 at 7:12 AM Finn Thain wrote: > On Sat, 13 Feb 2021, Song Bao Hua (Barry Song) wrote: > > So what is really confusing and a pain to me is that: > > For years people like me have been writing device drivers > > with the idea that irq handlers run with interrupts > > disabled aft

RE: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-13 Thread Finn Thain
On Sat, 13 Feb 2021, Song Bao Hua (Barry Song) wrote: > > So what is really confusing and a pain to me is that: > For years people like me have been writing device drivers > with the idea that irq handlers run with interrupts > disabled after those commits in genirq. So I don't need > to care abo

RE: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-13 Thread Song Bao Hua (Barry Song)
t; > mi...@redhat.com; linux-m...@lists.linux-m68k.org; > fth...@telegraphics.com.au; linux-kernel@vger.kernel.org > Subject: RE: [RFC] IRQ handlers run with some high-priority interrupts(not > NMI) > enabled on some platform > > > > > -Original Message-

RE: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-13 Thread Song Bao Hua (Barry Song)
rg; cor...@lwn.net; > mi...@redhat.com; linux-m...@lists.linux-m68k.org; > fth...@telegraphics.com.au; linux-kernel@vger.kernel.org > Subject: Re: [RFC] IRQ handlers run with some high-priority interrupts(not > NMI) > enabled on some platform > > On Sat, Feb 13, 2021 at 12:5

Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-13 Thread Arnd Bergmann
On Sat, Feb 13, 2021 at 12:50 AM Song Bao Hua (Barry Song) wrote: > So I was actually trying to warn this unusual case - interrupts > get nested while both in_hardirq() and irqs_disabled() are true. > > diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h > index 7c9d6a2d7e90..b8ca27555

RE: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-12 Thread Song Bao Hua (Barry Song)
rg; cor...@lwn.net; > mi...@redhat.com; linux-m...@lists.linux-m68k.org; > fth...@telegraphics.com.au; linux-kernel@vger.kernel.org > Subject: Re: [RFC] IRQ handlers run with some high-priority interrupts(not > NMI) > enabled on some platform > > On Sat, Feb 13, 2021 at 12:0

Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-12 Thread Arnd Bergmann
xfoundation.org; a...@arndb.de; > > ge...@linux-m68k.org; fun...@jurai.org; ph...@gnu.org; cor...@lwn.net; > > mi...@redhat.com; linux-m...@lists.linux-m68k.org; > > fth...@telegraphics.com.au; linux-kernel@vger.kernel.org > > Subject: Re: [RFC] IRQ handlers run with some

RE: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-12 Thread Song Bao Hua (Barry Song)
rg; cor...@lwn.net; > mi...@redhat.com; linux-m...@lists.linux-m68k.org; > fth...@telegraphics.com.au; linux-kernel@vger.kernel.org > Subject: Re: [RFC] IRQ handlers run with some high-priority interrupts(not > NMI) > enabled on some platform > > On Fri, Feb 12, 2021 at 2:1

Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform

2021-02-12 Thread Arnd Bergmann
On Fri, Feb 12, 2021 at 2:18 AM Song Bao Hua (Barry Song) wrote: > So I am requesting comments on: > 1. are we expecting all interrupts except NMI to be disabled in irq handler, > or do we actually allow some high-priority interrupts between low and NMI to > come in some platforms? I tried to co