Re: [PATCH v2 1/2] dmaengine: virt-dma: convert tasklet to BH workqueue for callback invocation

From: Amelie Delaunay
Date: Mon Jun 30 2025 - 07:09:01 EST




On 6/16/25 14:48, Alexander Kochetkov wrote:
Currently DMA callbacks are called from tasklet. However the tasklet is
marked deprecated and must be replaced by BH workqueue. Tasklet callbacks
are executed either in the Soft IRQ context or from ksoftirqd thread. BH
workqueue work items are executed in the BH context. Changing tasklet to
BH workqueue improved DMA callback latencies.

The commit changes virt-dma driver and all of its users:
- tasklet is replaced to work_struct, tasklet callback updated accordingly
- kill_tasklet() is replaced to cancel_work_sync()
- added include of linux/interrupt.h where necessary

Tested on Pine64 (Allwinner A64 ARMv8) with sun6i-dma driver. All other
drivers are changed similarly and tested for compilation.

Signed-off-by: Alexander Kochetkov <al.kochet@xxxxxxxxx>
---
...
drivers/dma/stm32/stm32-dma.c | 1 +
drivers/dma/stm32/stm32-dma3.c | 1 +
drivers/dma/stm32/stm32-mdma.c | 1 +

For STM32:
Acked-by: Amelie Delaunay <amelie.delaunay@xxxxxxxxxxx>
Tested-by: Amelie Delaunay <amelie.delaunay@xxxxxxxxxxx>