linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] chelsio: cxgb: Use threaded irqs
@ 2020-12-24 13:11 Ahmed S. Darwish
  2020-12-24 13:11 ` [RFC PATCH 1/3] chelsio: cxgb: Remove ndo_poll_controller() Ahmed S. Darwish
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ahmed S. Darwish @ 2020-12-24 13:11 UTC (permalink / raw)
  To: Rahul Lakkireddy, Rohit Maheshwari, Vinay Kumar Yadav,
	Vishal Kulkarni, netdev
  Cc: David S. Miller, Jakub Kicinski, LKML, Thomas Gleixner,
	Sebastian A. Siewior, Ahmed S. Darwish

Folks,

The t1_interrupt() irq handler calls del_timer_sync() down the chain:

   sge.c: t1_interrupt()
     -> subr.c: t1_slow_intr_handler()
       -> asic_slow_intr() || fpga_slow_intr()
         -> t1_pci_intr_handler()
 	  -> cxgb2.c: t1_fatal_err()		# Cont. at [*]
       -> fpga_slow_intr()
         -> sge.c: t1_sge_intr_error_handler()
 	  -> cxgb2.c: t1_fatal_err()		# Cont. at [*]

[*] cxgb2.c: t1_fatal_err()
      -> sge.c: t1_sge_stop()
        -> timer.c: del_timer_sync()

This is invalid: if an irq handler calls del_timer_sync() on a timer
it has already interrupted, it will just loop forever.  That's why
del_timer_sync() also has a WARN_ON(in_irq()).

Included is an RFC patch series that runs the interrupt handler slow
path, t1_slow_intr_handler(), in a threaded-irq context.

This also leads to nice code savings across the driver, as some
workqueues and spinlocks are no longer needed.

Note: Only compile-tested. I do not have the hardware in question.

Thanks,

8<--------------

Ahmed S. Darwish (3):
  chelsio: cxgb: Remove ndo_poll_controller()
  chelsio: cxgb: Move slow interrupt handling to threaded irqs
  chelsio: cxgb: Do not schedule a workqueue for external interrupts

 drivers/net/ethernet/chelsio/cxgb/common.h |  2 -
 drivers/net/ethernet/chelsio/cxgb/cxgb2.c  | 58 ++--------------------
 drivers/net/ethernet/chelsio/cxgb/sge.c    | 25 +++++++---
 drivers/net/ethernet/chelsio/cxgb/sge.h    |  3 +-
 drivers/net/ethernet/chelsio/cxgb/subr.c   |  2 +-
 5 files changed, 25 insertions(+), 65 deletions(-)

base-commit: 2c85ebc57b3e1817b6ce1a6b703928e113a90442
-- 
2.29.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-11 10:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-24 13:11 [RFC PATCH 0/3] chelsio: cxgb: Use threaded irqs Ahmed S. Darwish
2020-12-24 13:11 ` [RFC PATCH 1/3] chelsio: cxgb: Remove ndo_poll_controller() Ahmed S. Darwish
2020-12-24 13:31   ` Ahmed S. Darwish
2020-12-24 13:11 ` [RFC PATCH 2/3] chelsio: cxgb: Move slow interrupt handling to threaded irqs Ahmed S. Darwish
2021-01-11 10:38   ` Sebastian A. Siewior
2020-12-24 13:11 ` [RFC PATCH 3/3] chelsio: cxgb: Do not schedule a workqueue for external interrupts Ahmed S. Darwish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).