[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZgW3j1qkLA-QU4iM@matsya>
Date: Fri, 29 Mar 2024 00:01:43 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Allen Pais <apais@...ux.microsoft.com>, linux-kernel@...r.kernel.org,
Tejun Heo <tj@...nel.org>, Kees Cook <keescook@...omium.org>,
Hector Martin <marcan@...can.st>, Sven Peter <sven@...npeter.dev>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Ray Jui <rjui@...adcom.com>, Scott Branden <sbranden@...adcom.com>,
Paul Cercueil <paul@...pouillou.net>, Eugeniy.Paltsev@...opsys.com,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Viresh Kumar <vireshk@...nel.org>, Frank Li <Frank.Li@....com>,
Leo Li <leoyang.li@....com>, zw@...kernel.org,
Zhou Wang <wangzhou1@...ilicon.com>, haijie1@...wei.com,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
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>,
logang@...tatee.com, Daniel Mack <daniel@...que.org>,
Haojian Zhuang <haojian.zhuang@...il.com>,
Robert Jarzmik <robert.jarzmik@...e.fr>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
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>,
Linus Walleij <linus.walleij@...aro.org>,
Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>, peter.ujfalusi@...il.com,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Wei Liu <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>,
Jassi Brar <jassisinghbrar@...il.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
maintainers@...echerrydvr.com, aubin.constans@...rochip.com,
Ulf Hansson <ulf.hansson@...aro.org>,
Manuel Lauss <manuel.lauss@...il.com>,
Michał Mirosław <mirq-linux@...e.qmqm.pl>,
"jh80.chung" <jh80.chung@...sung.com>, oakad@...oo.com,
Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>,
Masami Hiramatsu <mhiramat@...nel.org>, brucechang@....com.tw,
HaraldWelte@...tech.com, pierre@...man.eu, duncan.sands@...e.fr,
Alan Stern <stern@...land.harvard.edu>,
Oliver Neukum <oneukum@...e.com>,
openipmi-developer@...ts.sourceforge.net, dmaengine@...r.kernel.org,
asahi@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
linux-rpi-kernel@...ts.infradead.org, linux-mips@...r.kernel.org,
imx@...ts.linux.dev, linuxppc-dev@...ts.ozlabs.org,
linux-mediatek@...ts.infradead.org,
linux-actions@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
linux-riscv@...ts.infradead.org, linux-sunxi@...ts.linux.dev,
linux-tegra@...r.kernel.org, linux-hyperv@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-media@...r.kernel.org,
"linux-mmc @ vger . kernel . org" <linux-mmc@...r.kernel.org>,
Linux-OMAP <linux-omap@...r.kernel.org>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
linux-s390@...r.kernel.org, Netdev <netdev@...r.kernel.org>,
linux-usb@...r.kernel.org
Subject: Re: [PATCH 2/9] dma: Convert from tasklet to BH workqueue
On 28-03-24, 11:08, Arnd Bergmann wrote:
> On Thu, Mar 28, 2024, at 06:55, Vinod Koul wrote:
> > On 27-03-24, 16:03, Allen Pais wrote:
> >> 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.
> >
> > Thanks for conversion, am happy with BH alternative as it helps in
> > dmaengine where we need shortest possible time between tasklet and
> > interrupt handling to maximize dma performance
>
> I still feel that we want something different for dmaengine,
> at least in the long run. As we have discussed in the past,
> the tasklet context in these drivers is what the callbacks
> from the dma client device is run in, and a lot of these probably
> want something other than tasklet context, e.g. just call
> complete() on a client-provided completion structure.
>
> Instead of open-coding the use of the system_bh_wq in each
> dmaengine, how about we start with a custom WQ_BH
> specifically for the dmaengine subsystem and wrap them
> inside of another interface.
>
> Since almost every driver associates the tasklet with the
> dma_chan, we could go one step further and add the
> work_queue structure directly into struct dma_chan,
> with the wrapper operating on the dma_chan rather than
> the work_queue.
I think that is very great idea. having this wrapped in dma_chan would
be very good way as well
Am not sure if Allen is up for it :-)
--
~Vinod
Powered by blists - more mailing lists