lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aExS9WB0Ussl4Lec@smile.fi.intel.com>
Date: Fri, 13 Jun 2025 19:33:57 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Alexander Kochetkov <al.kochet@...il.com>
Cc: Vinod Koul <vkoul@...nel.org>, dmaengine@...r.kernel.org,
	linux-kernel@...r.kernel.org, Nishad Saraf <nishads@....com>,
	Lizhi Hou <lizhi.hou@....com>, Jacky Huang <ychuang3@...oton.com>,
	Shan-Chun Hung <schung@...oton.com>,
	Florian Fainelli <florian.fainelli@...adcom.com>,
	Ray Jui <rjui@...adcom.com>, Scott Branden <sbranden@...adcom.com>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Paul Cercueil <paul@...pouillou.net>,
	Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>,
	Manivannan Sadhasivam <mani@...nel.org>,
	Frank Li <Frank.Li@....com>, Zhou Wang <wangzhou1@...ilicon.com>,
	Longfang Liu <liulongfang@...wei.com>,
	Andy Shevchenko <andy@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>,
	Keguang Zhang <keguang.zhang@...il.com>,
	Sean Wang <sean.wang@...iatek.com>,
	Matthias Brugger <matthias.bgg@...il.com>,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	Andreas Färber <afaerber@...e.de>,
	Daniel Mack <daniel@...que.org>,
	Haojian Zhuang <haojian.zhuang@...il.com>,
	Robert Jarzmik <robert.jarzmik@...e.fr>,
	Paul Walmsley <paul.walmsley@...ive.com>,
	Samuel Holland <samuel.holland@...ive.com>,
	Orson Zhai <orsonzhai@...il.com>,
	Baolin Wang <baolin.wang@...ux.alibaba.com>,
	Chunyan Zhang <zhang.lyra@...il.com>,
	Patrice Chotard <patrice.chotard@...s.st.com>,
	Amélie Delaunay <amelie.delaunay@...s.st.com>,
	Maxime Coquelin <mcoquelin.stm32@...il.com>,
	Alexandre Torgue <alexandre.torgue@...s.st.com>,
	Chen-Yu Tsai <wens@...e.org>,
	Jernej Skrabec <jernej.skrabec@...il.com>,
	Laxman Dewangan <ldewangan@...dia.com>,
	Jon Hunter <jonathanh@...dia.com>,
	Thierry Reding <thierry.reding@...il.com>,
	Peter Ujfalusi <peter.ujfalusi@...il.com>,
	Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Dave Jiang <dave.jiang@...el.com>,
	Amit Vadhavana <av2082000@...il.com>,
	Uwe Kleine-König <u.kleine-koenig@...libre.com>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Md Sadre Alam <quic_mdalam@...cinc.com>,
	Casey Connolly <casey.connolly@...aro.org>,
	Kees Cook <kees@...nel.org>, Fenghua Yu <fenghua.yu@...el.com>,
	Jyothi Kumar Seerapu <quic_jseerapu@...cinc.com>
Subject: Re: [PATCH 1/1] dmaengine: virt-dma: convert tasklet to BH workqueue
 for callback invocation

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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ