Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-11 Thread Jakub Kicinski
On Sun, 11 Oct 2020 11:24:41 +0200 Heiner Kallweit wrote: > >> qeth_qdio_poll > >> netvsc_channel_cb > >> napi_watchdog > > > > This one runs from a hrtimer, which I believe will be a hard irq > > context on anything but RT. I could be wrong. > > > > A similar discussion can be found e.g. he

Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-11 Thread Jakub Kicinski
On Sun, 11 Oct 2020 15:42:24 +0200 Heiner Kallweit wrote: > On 10.10.2020 17:22, Jakub Kicinski wrote: > > On Sat, 10 Oct 2020 15:08:15 +0200 Heiner Kallweit wrote: > >> On 09.10.2020 18:06, Heiner Kallweit wrote: > >>> On 09.10.2020 17:58, Jakub Kicinski wrote: > On Fri, 9 Oct 2020 16

Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-11 Thread Heiner Kallweit
On 10.10.2020 17:22, Jakub Kicinski wrote: > On Sat, 10 Oct 2020 15:08:15 +0200 Heiner Kallweit wrote: >> On 09.10.2020 18:06, Heiner Kallweit wrote: >>> On 09.10.2020 17:58, Jakub Kicinski wrote: On Fri, 9 Oct 2020 16:54:06 +0200 Heiner Kallweit wrote: > I'm thinking about a __napi_sc

Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-11 Thread Heiner Kallweit
On 10.10.2020 17:22, Jakub Kicinski wrote: > On Sat, 10 Oct 2020 15:08:15 +0200 Heiner Kallweit wrote: >> On 09.10.2020 18:06, Heiner Kallweit wrote: >>> On 09.10.2020 17:58, Jakub Kicinski wrote: On Fri, 9 Oct 2020 16:54:06 +0200 Heiner Kallweit wrote: > I'm thinking about a __napi_sc

Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-10 Thread Jakub Kicinski
On Sat, 10 Oct 2020 15:08:15 +0200 Heiner Kallweit wrote: > On 09.10.2020 18:06, Heiner Kallweit wrote: > > On 09.10.2020 17:58, Jakub Kicinski wrote: > >> On Fri, 9 Oct 2020 16:54:06 +0200 Heiner Kallweit wrote: > >>> I'm thinking about a __napi_schedule version that disables hard irq's > >>>

Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-10 Thread Heiner Kallweit
On 09.10.2020 18:06, Heiner Kallweit wrote: > On 09.10.2020 17:58, Jakub Kicinski wrote: >> On Fri, 9 Oct 2020 16:54:06 +0200 Heiner Kallweit wrote: >>> I'm thinking about a __napi_schedule version that disables hard irq's >>> conditionally, based on variable force_irqthreads, exported by the irq >

Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-09 Thread Heiner Kallweit
On 09.10.2020 17:58, Jakub Kicinski wrote: > On Fri, 9 Oct 2020 16:54:06 +0200 Heiner Kallweit wrote: >> I'm thinking about a __napi_schedule version that disables hard irq's >> conditionally, based on variable force_irqthreads, exported by the irq >> subsystem. This would allow to behave correctly

Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-09 Thread Jakub Kicinski
On Fri, 9 Oct 2020 16:54:06 +0200 Heiner Kallweit wrote: > I'm thinking about a __napi_schedule version that disables hard irq's > conditionally, based on variable force_irqthreads, exported by the irq > subsystem. This would allow to behave correctly with threadirqs set, > whilst not loosing the _

Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-09 Thread Heiner Kallweit
On 08.10.2020 18:27, John Keeping wrote: > With threadirqs, stmmac_interrupt() is called on a thread with hardirqs > enabled so we cannot call __napi_schedule_irqoff(). Under lockdep it > leads to: > > [ cut here ] > WARNING: CPU: 0 PID: 285 at kernel/softirq.c

Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-09 Thread Vladimir Oltean
On Fri, Oct 09, 2020 at 10:59:45AM +0100, John Keeping wrote: > No, it's not, although I would have saved several days debugging if it > was! I backported the lockdep warning to prove that it caught this > issue. > > The evidence it is possible to see on vanilla 5.4.x is: > > $ trace-cmd rep

Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-09 Thread John Keeping
On Fri, 9 Oct 2020 02:46:09 +0300 Vladimir Oltean wrote: > On Thu, Oct 08, 2020 at 05:27:49PM +0100, John Keeping wrote: > > With threadirqs, stmmac_interrupt() is called on a thread with hardirqs > > enabled so we cannot call __napi_schedule_irqoff(). Under lockdep it > > leads to: > > > >

Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-08 Thread Vladimir Oltean
On Thu, Oct 08, 2020 at 05:27:49PM +0100, John Keeping wrote: > With threadirqs, stmmac_interrupt() is called on a thread with hardirqs > enabled so we cannot call __napi_schedule_irqoff(). Under lockdep it > leads to: > > [ cut here ] > WARNING: CPU: 0 PID: 28

[PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-08 Thread John Keeping
With threadirqs, stmmac_interrupt() is called on a thread with hardirqs enabled so we cannot call __napi_schedule_irqoff(). Under lockdep it leads to: [ cut here ] WARNING: CPU: 0 PID: 285 at kernel/softirq.c:598 __raise_softirq_irqoff+0x6c/0x1c8 I