Re: [PATCH v2 3/3] spi: dw: use threaded interrupt and optimize the threaded ISR

Mark Brown <[email protected]>
Newsgroups org.kernel.vger.linux-spi,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Mon, Aug 03, 2026 at 10:06:49PM +0800, Jisheng Zhang wrote:

> To avoid blocking for an excessive amount of time, eventually impacting
> on system responsiveness, hard interrupt handlers should finish
> executing in as little time as possible.
> 
> Use threaded interrupt and move the SPI transfer handling to an
> interrupt thread.

It might be safer to make this happen only in host mode, not in target
mode - while the performance improvement will apply for both target mode
has no control over the clocking of data by the host so is much more
vulnerable to dropping data in a threaded interrupt if the system is
loaded.  In host mode this isn't an issue since we'll simply stop
clocking data while waiting for the scheduler to get round to the
interrupt thread.
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmp2FrsACgkQJNaLcl1U
h9CnBwf8CDXYrliuhcMpvFjtY9AevzWw0jNeKlhUMRAsVgTg93To7KGE7gAvoodB
jG+0WnE13uM7jboJbeUOL+5IUnrKboIAAYDWZAQ1bURL2sfkRI2mXcaST6fHlI9h
gUAY60PKB0Jkeyg5GjdswpwbaqiTcE8GJf1uLd2+Hsobvd4F6wN+yrgKgTDgorMT
XpX8vFTKxK64g/8PDsAcvF7bkXjfLMM1+soyMUUaSciYcgVUAgAThQwSUAzvDXbg
T6nEEi5JMbFy8AVdphopYiA/mVk7G90PUl/VUCszre6BPUZa1xxUwGvc+g5ZfHMM
3tuiGIIL/pikKi0Xn10xdwR5leXTyQ==
=Bq7k
-----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.