From: "Ahmed S. Darwish" <a.darwish@linutronix.de> To: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>, Rohit Maheshwari <rohitm@chelsio.com>, Vinay Kumar Yadav <vinay.yadav@chelsio.com>, Vishal Kulkarni <vishal@chelsio.com>, netdev@vger.kernel.org Cc: "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, LKML <linux-kernel@vger.kernel.org>, Thomas Gleixner <tglx@linutronix.de>, "Sebastian A. Siewior" <bigeasy@linutronix.de>, "Ahmed S. Darwish" <a.darwish@linutronix.de> Subject: [RFC PATCH 0/3] chelsio: cxgb: Use threaded irqs Date: Thu, 24 Dec 2020 14:11:45 +0100 Message-ID: <20201224131148.300691-1-a.darwish@linutronix.de> (raw) 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
next reply index Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-24 13:11 Ahmed S. Darwish [this message] 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
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=20201224131148.300691-1-a.darwish@linutronix.de \ --to=a.darwish@linutronix.de \ --cc=bigeasy@linutronix.de \ --cc=davem@davemloft.net \ --cc=kuba@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=netdev@vger.kernel.org \ --cc=rahul.lakkireddy@chelsio.com \ --cc=rohitm@chelsio.com \ --cc=tglx@linutronix.de \ --cc=vinay.yadav@chelsio.com \ --cc=vishal@chelsio.com \ /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
LKML Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lkml.kernel.org/lkml/0 lkml/git/0.git git clone --mirror https://lkml.kernel.org/lkml/1 lkml/git/1.git git clone --mirror https://lkml.kernel.org/lkml/2 lkml/git/2.git git clone --mirror https://lkml.kernel.org/lkml/3 lkml/git/3.git git clone --mirror https://lkml.kernel.org/lkml/4 lkml/git/4.git git clone --mirror https://lkml.kernel.org/lkml/5 lkml/git/5.git git clone --mirror https://lkml.kernel.org/lkml/6 lkml/git/6.git git clone --mirror https://lkml.kernel.org/lkml/7 lkml/git/7.git git clone --mirror https://lkml.kernel.org/lkml/8 lkml/git/8.git git clone --mirror https://lkml.kernel.org/lkml/9 lkml/git/9.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 lkml lkml/ https://lkml.kernel.org/lkml \ linux-kernel@vger.kernel.org public-inbox-index lkml Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git