Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp104343lqz; Fri, 29 Mar 2024 09:52:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWIOMYdMqW2/dXqmF/U+Ha29BgJZ+Nb9sNMe593EH4W0iud6xRuUwPSl2OclQp8ZmxmEfL5/HuYqhCdC3H5CFST8os25cX1RG6/YWlD/Q== X-Google-Smtp-Source: AGHT+IGJQHRsWOkmVmjRXJdhtnaERjpZPMvgb6lYlI9Il56ZS/25Riwfa826Es3kHHM9bB/OUGFP X-Received: by 2002:a05:6e02:1847:b0:368:980b:1078 with SMTP id b7-20020a056e02184700b00368980b1078mr3014621ilv.17.1711731159872; Fri, 29 Mar 2024 09:52:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711731159; cv=pass; d=google.com; s=arc-20160816; b=jkQ4OFe3TcHZ0hI26P8h2zr3SUyNGtV24MQd/dZhJEdZ4ZOWFVP7qOWVIxG2MvrH2Y B5Qe6A/GFy/+4jFBbfi3Ymk6t/qetPd10ioCt+E3NoXPu2KT3xcz5vr4V6MqMa2enhFi GC6L2wLCZC4gtxwWXpJ6lcngU6AGks4FZqtb27CQyNd1yTiBQzeEkPxlSbtL4RvztWVk 5M6MgLOe7+q1T+63rTLFNR58KeHMmm5HkDRXxnw0qygJneZta8+Lgoa2fXXZtiAfLYy9 G2j4W5sVFPWZ7RsgOW7WhbDnUC5Lsx2HcTHzGuQuhT+JK8UNPXCfGu9y1Swd4QZzAm1g v9Rg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QX+pj3ylEWCAp85oOvAghe4Anwxmp2zsGxUDux6EioU=; fh=PDtkEWR/e3YoVHUWm4j0mX0a1N/ZAQnxxL+hI1kGFG4=; b=ZysaKvUA/aYw5JYZG3h+neNxJ/K5inxNYTvAK3PF7wEiBWpYaw19tn/Vw6MwM5la7C 5cjnfnqoQvgjNwxemJr5W9QXiKn7cRswMkWdXVSo4mhBTCWl74SJxNFnrwqcRywylWax F4M3aqQV42i3CS5nlh3A5JdJyuoM+zipvBcEz9NZTXFfg0ymdjmntU4DipojwN3Pw7Y2 F5DTHU0pxwftJv8vITNQa6TgUMtmiT7WoXdoMJ+JmGZ8fGMfYTOEEMwG7qFH/OfNVVF4 8Ih4ba7rr9TC0GIkY6B4H9E370aHQLvA7re2rHY/WEpt49FOK/xsUm4UZeDjJQTg5Ntq JUow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uEituwgn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-125184-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125184-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a19-20020a637053000000b005e857e4fe0fsi4000718pgn.517.2024.03.29.09.52.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 09:52:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125184-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uEituwgn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-125184-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125184-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 43566B24DB3 for ; Fri, 29 Mar 2024 16:39:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D0F41327F0; Fri, 29 Mar 2024 16:39:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uEituwgn" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC0452D781; Fri, 29 Mar 2024 16:39:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711730344; cv=none; b=jc+9bkBL2wQj3pMdI6pGRf1yh1g6kQWknddt2ymYF8jQ3fSy3k6iN6650yXpifj7sZ9OpFONQjev/G1sGNtxzuI43/EXps+kXmgu59fnBU8w95EbOseMoObcX/MBOd8t0ncmbc0uVFc1se+v+u0yqw33SKNfEwmYqoeTWkb+Xgc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711730344; c=relaxed/simple; bh=mu709RK6RdUvGezRsei4fEVVFDMPGmRnjx++n5sjyL0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OAJmHWzesT5fcmCnQNJhS2UiH0VZFtmDrdxPLag8o3wp6bYMw2/bl4rr196gudTn1VkTGidnH5lc4nrgFE76iz3JCvL7KlGCv60R7zr7idekbnicm9VuQ5ZmC6xayuwCK2db1rAKY8424a/Kre+R7/+XcQtzQtkNUS7E5VW9pNA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uEituwgn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 717E8C433C7; Fri, 29 Mar 2024 16:39:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711730343; bh=mu709RK6RdUvGezRsei4fEVVFDMPGmRnjx++n5sjyL0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uEituwgn1xxAMuURhdwt3/iaLtwEGCu1+Mclwo9+Ty7wLbaMiWmyQU0rOPlf9vJzM o13NJKluh2NnMuLRvgLiGrQVrebzv3a2gzICu48+3LXXhQ45oB4NluNbhd7SB44a70 M0Wt2X6l0SJT7LJi3C8GA4V9BEhry7YR3ma4wI/3OylDT4TAEwBE8hLV/q3auS8o5H 9muF3kTL6rkQ20Iba0mAQK6pIs92yEx6N2CKY/CrPm5aLVKXPn+H3gbBFziiX6OMqC zpP4PltZewjblpXJOZBFZ8cpmv8jSqFoiAAks6EZfkeP36KAWbWprPmsY2/9TNUion NxXBlJGeFB7CQ== Date: Fri, 29 Mar 2024 22:08:58 +0530 From: Vinod Koul To: Allen Cc: Arnd Bergmann , Allen Pais , linux-kernel@vger.kernel.org, Tejun Heo , Kees Cook , Hector Martin , Sven Peter , Florian Fainelli , Ray Jui , Scott Branden , Paul Cercueil , Eugeniy.Paltsev@synopsys.com, Manivannan Sadhasivam , Viresh Kumar , Frank Li , Leo Li , zw@zh-kernel.org, Zhou Wang , haijie1@huawei.com, Shawn Guo , Sascha Hauer , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , Andreas =?iso-8859-1?Q?F=E4rber?= , logang@deltatee.com, Daniel Mack , Haojian Zhuang , Robert Jarzmik , Bjorn Andersson , Konrad Dybcio , Orson Zhai , Baolin Wang , Chunyan Zhang , Patrice Chotard , Linus Walleij , Chen-Yu Tsai , Jernej Skrabec , peter.ujfalusi@gmail.com, "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Jassi Brar , Mauro Carvalho Chehab , maintainers@bluecherrydvr.com, aubin.constans@microchip.com, Ulf Hansson , Manuel Lauss , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , "jh80.chung" , oakad@yahoo.com, Kunihiko Hayashi , Masami Hiramatsu , brucechang@via.com.tw, HaraldWelte@viatech.com, pierre@ossman.eu, Duncan Sands , Alan Stern , Oliver Neukum , openipmi-developer@lists.sourceforge.net, dmaengine@vger.kernel.org, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-mips@vger.kernel.org, imx@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-mediatek@lists.infradead.org, linux-actions@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, "linux-mmc @ vger . kernel . org" , Linux-OMAP , Linux-Renesas , linux-s390@vger.kernel.org, Netdev , linux-usb@vger.kernel.org Subject: Re: [PATCH 2/9] dma: Convert from tasklet to BH workqueue Message-ID: References: <20240327160314.9982-1-apais@linux.microsoft.com> <20240327160314.9982-3-apais@linux.microsoft.com> <2e9257af-c123-406b-a189-eaebeecc1d71@app.fastmail.com> <678ba20b-9f1d-41cb-8a25-e716b61ffafe@app.fastmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On 28-03-24, 13:01, Allen wrote: > > >> > 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 :-) > > > > > > Thanks Arnd, I know we did speak about this at LPC. I did start > > > working on using completion. I dropped it as I thought it would > > > be easier to move to workqueues. > > > > It's definitely easier to do the workqueue conversion as a first > > step, and I agree adding support for the completion right away is > > probably too much. Moving the work_struct into the dma_chan > > is probably not too hard though, if you leave your current > > approach for the cases where the tasklet is part of the > > dma_dev rather than the dma_chan. > > > > Alright, I will work on moving work_struck into the dma_chan and > leave the dma_dev as is (using bh workqueues) and post a RFC. > Once reviewed, I could move to the next step. That might be better from a performance pov but the current design is a global tasklet and not a per chan one... We would need to carefully review and test this for sure -- ~Vinod