All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Alexander Kochetkov <al.kochet@gmail.com>
Cc: "Vinod Koul" <vkoul@kernel.org>,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Nishad Saraf" <nishads@amd.com>, "Lizhi Hou" <lizhi.hou@amd.com>,
	"Jacky Huang" <ychuang3@nuvoton.com>,
	"Shan-Chun Hung" <schung@nuvoton.com>,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Ray Jui" <rjui@broadcom.com>,
	"Scott Branden" <sbranden@broadcom.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Paul Cercueil" <paul@crapouillou.net>,
	"Eugeniy Paltsev" <Eugeniy.Paltsev@synopsys.com>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Frank Li" <Frank.Li@nxp.com>,
	"Zhou Wang" <wangzhou1@hisilicon.com>,
	"Longfang Liu" <liulongfang@huawei.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Keguang Zhang" <keguang.zhang@gmail.com>,
	"Sean Wang" <sean.wang@mediatek.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Daniel Mack" <daniel@zonque.org>,
	"Haojian Zhuang" <haojian.zhuang@gmail.com>,
	"Robert Jarzmik" <robert.jarzmik@free.fr>,
	"Paul Walmsley" <paul.walmsley@sifive.com>,
	"Samuel Holland" <samuel.holland@sifive.com>,
	"Orson Zhai" <orsonzhai@gmail.com>,
	"Baolin Wang" <baolin.wang@linux.alibaba.com>,
	"Chunyan Zhang" <zhang.lyra@gmail.com>,
	"Patrice Chotard" <patrice.chotard@foss.st.com>,
	"Amélie Delaunay" <amelie.delaunay@foss.st.com>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Laxman Dewangan" <ldewangan@nvidia.com>,
	"Jon Hunter" <jonathanh@nvidia.com>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Peter Ujfalusi" <peter.ujfalusi@gmail.com>,
	"Kunihiko Hayashi" <hayashi.kunihiko@socionext.com>,
	"Masami Hiramatsu" <mhiramat@kernel.org>,
	"Dave Jiang" <dave.jiang@intel.com>,
	"Amit Vadhavana" <av2082000@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	"Ulf Hansson" <ulf.hansson@linaro.org>,
	"Md Sadre Alam" <quic_mdalam@quicinc.com>,
	"Casey Connolly" <casey.connolly@linaro.org>,
	"Kees Cook" <kees@kernel.org>,
	"Fenghua Yu" <fenghua.yu@intel.com>,
	"Jyothi Kumar Seerapu" <quic_jseerapu@quicinc.com>
Subject: Re: [PATCH 1/1] dmaengine: virt-dma: convert tasklet to BH workqueue for callback invocation
Date: Fri, 13 Jun 2025 19:33:57 +0300	[thread overview]
Message-ID: <aExS9WB0Ussl4Lec@smile.fi.intel.com> (raw)
In-Reply-To: <20250613143605.5748-2-al.kochet@gmail.com>

On Fri, Jun 13, 2025 at 02:34:44PM +0000, 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.

...

> --- a/drivers/dma/amd/qdma/qdma.c
> +++ b/drivers/dma/amd/qdma/qdma.c
> @@ -13,6 +13,7 @@
>  #include <linux/platform_device.h>
>  #include <linux/platform_data/amd_qdma.h>
>  #include <linux/regmap.h>
> +#include <linux/interrupt.h>

It seems it was ordered. Please, preserve the order.
It not, try to squeeze to have longest possible ordered chain
(it can be interleaved with something unordered, just look at
 the big picture).

(Same applies to other similar cases)

...

What about the driver(s) that use threaded IRQ instead?
Do you plan to convert them as well?

I am talking about current users of virt-dma that do not use tasklets.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-06-13 16:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-13 14:34 [PATCH 0/1] dmaengine: virt-dma: convert tasklet to BH workqueue for callback invocation Alexander Kochetkov
2025-06-13 14:34 ` [PATCH 1/1] " Alexander Kochetkov
2025-06-13 16:33   ` Andy Shevchenko [this message]
2025-06-13 18:51     ` Alexander Kochetkov
2025-06-13 20:58       ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aExS9WB0Ussl4Lec@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=Frank.Li@nxp.com \
    --cc=afaerber@suse.de \
    --cc=al.kochet@gmail.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=amelie.delaunay@foss.st.com \
    --cc=andy@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=av2082000@gmail.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=casey.connolly@linaro.org \
    --cc=daniel@zonque.org \
    --cc=dave.jiang@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=fenghua.yu@intel.com \
    --cc=festevam@gmail.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=kees@kernel.org \
    --cc=keguang.zhang@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=lars@metafoo.de \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liulongfang@huawei.com \
    --cc=lizhi.hou@amd.com \
    --cc=mani@kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mhiramat@kernel.org \
    --cc=nishads@amd.com \
    --cc=orsonzhai@gmail.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=paul.walmsley@sifive.com \
    --cc=paul@crapouillou.net \
    --cc=peter.ujfalusi@gmail.com \
    --cc=quic_jseerapu@quicinc.com \
    --cc=quic_mdalam@quicinc.com \
    --cc=rjui@broadcom.com \
    --cc=robert.jarzmik@free.fr \
    --cc=s.hauer@pengutronix.de \
    --cc=samuel.holland@sifive.com \
    --cc=sbranden@broadcom.com \
    --cc=schung@nuvoton.com \
    --cc=sean.wang@mediatek.com \
    --cc=shawnguo@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vkoul@kernel.org \
    --cc=wangzhou1@hisilicon.com \
    --cc=wens@csie.org \
    --cc=ychuang3@nuvoton.com \
    --cc=zhang.lyra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.