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

From: Mark Brown

Date: Fri Aug 07 2026 - 13:32:56 EST


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.

Attachment: signature.asc
Description: PGP signature