Re: [PATCH v5 1/3] spi: tegra210-quad: Convert to hard IRQ with high-priority workqueue

Mark Brown <[email protected]>
Newsgroups org.kernel.vger.linux-tegra,org.kernel.vger.linux-kernel,org.kernel.vger.linux-spi
Message-ID <[email protected]>
On Wed, Jul 08, 2026 at 01:12:55AM +0000, Vishwaroop A wrote:

> Threaded IRQ handlers suffer from scheduler latency on heavily loaded
> systems, causing false transfer timeouts. Convert to a hard IRQ handler
> that schedules work on a high-priority unbound workqueue.

The high priority workqueue is a SCHED_NORMAL task with priority -20 so
it can be starved by real time tasks running at SCHED_FIFO, interrupt
threads are SCHED_FIFO (see the start of irq_thread()) so are harder to
starve.

> -	if (!t) {
> +static void tegra_qspi_work_handler(struct work_struct *work)
>  {

> -	 * If no transfer is in progress, check if this was a real interrupt
> -	 * that the timeout handler already processed, or a spurious one.
> +	 * tegra_qspi_handle_timeout() calls cancel_work_sync() before it
> +	 * invokes handle_{cpu,dma}_based_xfer() itself, so this work is

That's actually in patch 2 so we have a bisect issue here.  Not sure how
critical that is though.
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmpc4DoACgkQJNaLcl1U
h9Bl+Af+IG+QSnMmd97Wop/tWRHPZMqaeWxEqHhvOLYMLyRvMchNFZaUZwoIbeea
6bn4XpMUmTmxBgyN6RaGnWxNEX2fAlvsldzg8ypMNMmF0WoEtoe6mUyfwIiQMcCb
MDf78yeO6/mVOJwvSJC68iwAaFV+9tA1D31G7TkfaEDE6+6pyuDZMfgKj7UJVcmg
wTyCtgIYr06/8fnnumvySlwY/RfvHEln/m9HHo5VG2jcH6xSdC9hNaKps/ilc8nq
xgMn+To76hDCYKYhvp+N49cj14Ee7zNepW06muRfGlde0qtSiUr8HABBrB5tpKQk
7VQn9YPsJoehZlKqBXFVEAZ8YIInlw==
=SIaD
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.