Thread (50 messages) 50 messages, 20 authors, 2024-06-03

Re: [PATCH 2/9] dma: Convert from tasklet to BH workqueue

From: Vinod Koul <vkoul@kernel.org>
Date: 2024-04-02 13:11:26
Also in: asahi, dmaengine, imx, linux-arm-msm, linux-hyperv, linux-media, linux-mediatek, linux-mips, linux-mmc, linux-omap, linux-rdma, linux-renesas-soc, linux-riscv, linux-s390, linux-sunxi, linux-tegra, linux-usb, lkml, netdev

On 02-04-24, 14:25, Linus Walleij wrote:
Hi Allen,

thanks for your patch!

On Wed, Mar 27, 2024 at 5:03 PM Allen Pais [off-list ref] wrote:
quoted
The only generic interface to execute asynchronously in the BH context is
tasklet; however, it's marked deprecated and has some design flaws. To
replace tasklets, BH workqueue support was recently added. A BH workqueue
behaves similarly to regular workqueues except that the queued work items
are executed in the BH context.

This patch converts drivers/dma/* from tasklet to BH workqueue.

Based on the work done by Tejun Heo [off-list ref]
Branch: git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-6.10

Signed-off-by: Allen Pais <redacted>
(...)
quoted
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
(...)
quoted
        if (d40c->pending_tx)
-               tasklet_schedule(&d40c->tasklet);
+               queue_work(system_bh_wq, &d40c->work);
Why is "my" driver not allowed to use system_bh_highpri_wq?

I can't see the reasoning between some drivers using system_bh_wq
and others being highpri?

Given the DMA usecase I would expect them all to be high prio.
It didnt use tasklet_hi_schedule(), I guess Allen has done the
conversion of tasklet_schedule -> system_bh_wq and tasklet_hi_schedule
-> system_bh_highpri_wq

Anyway, we are going to use a dma queue so should be better performance

-- 
~Vinod
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help