From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66B87CD11DD for ; Thu, 28 Mar 2024 22:06:25 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=FpkFAP8N; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4V5HgN0mNqz3vhp for ; Fri, 29 Mar 2024 09:06:24 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=FpkFAP8N; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::72d; helo=mail-qk1-x72d.google.com; envelope-from=allen.lkml@gmail.com; receiver=lists.ozlabs.org) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4V5Dw14TyDz3vYj for ; Fri, 29 Mar 2024 07:02:09 +1100 (AEDT) Received: by mail-qk1-x72d.google.com with SMTP id af79cd13be357-78a5f7269e3so219220385a.1 for ; Thu, 28 Mar 2024 13:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711656126; x=1712260926; darn=lists.ozlabs.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=lQZIemFmXjC6xyiLulQ43Ea/EhoY/GbG4RXFhJQU0/8=; b=FpkFAP8NJxPmLVRD9SRxnZJQjPHv7RocGdziJKEV4vfFGUfkUxhx6Z/5NiX7RMK71C iZDJWs9yuSXnCAj2KKxwGcRD2HGbtMoiThLPbhNfTQ2VN2jBn4ngNnecPTidEc05Qt9r jbdl7H+42ITGvxRS+aEc9hxJp9jEceQ1jwOBh/D64Dtq7pbSWz1cQh/Qa0pC1DZWINUV an4BOmSUluP1DuhCnQPoAaOjITlQwdyB8QneIkL/vWqLQ/L1gWf5BYS0THoo3xT0vyhC LWmmcEML4FSmlY6ntHzhTLQ0fkIlwW1NSJbS2r5dDqvMNIwLE3rUt57PTF4x8by0/OzE sJRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711656126; x=1712260926; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lQZIemFmXjC6xyiLulQ43Ea/EhoY/GbG4RXFhJQU0/8=; b=ZbdSH7cjvuSqQ3CdDAglLSJxvrUWZwZ94w+UIvQLbqS+pYYGX6UhXHD3JQjOpGnOXm 32OJ+yBM/CGPKMxm9SoZ2qOKukPNHrsOjdeizOkJlTXrMv4Ai0MAHavUlRLCPT5bbWm7 1iQlCxHusIP9fuzRmO/7uvw/cE2pgReM74KPdg/kPMWFXkDy/voJl4roZohUUt23DO0a efra0C+tgsxVUpwLUmMuVoar894KfFyZ2Sb98OEn/6XKVON0CTzIfJ0254PGf1pWJ/oZ bUSEZS1VnPTONZlw6C5qhSqxjJKHiLgZbDb8+nRVNQt8Hwl//PxQSvhjrU7lSRNjS7AD 2B2g== X-Forwarded-Encrypted: i=1; AJvYcCUAtr7+2XPRdPCiUz9wAWC9cVGHzsZfUnGRuChMIUNdlIjWkzNz5DTsanuGmEamhUMs2mBgvnCOOPKcc5YG81tw0ZJob8eiGLGsW4qKzQ== X-Gm-Message-State: AOJu0Yz1AXNw4lMxvkyIANh23lgxnsVwV3THKsBsYUaBc4G7M74ifA0j dJ5rSsTS9ZvJLVu5vPiTonj2SfQ6q6oCsMoNjdNWonry7TwFK0Y1AZ6l3sOlWThhgLEtRaRveFn tWPbZuYbLf2MqJipmCGxUmcO0vHE= X-Google-Smtp-Source: AGHT+IFQNOvoxYEranyGbOCvmAR4etDDhau+OcrTFex7JkKGx6yINzP/h18hs1c4qiY1arvh6SuEYWtwfkxWkgaJ4wM= X-Received: by 2002:a05:620a:c4e:b0:78a:62a6:7e2f with SMTP id u14-20020a05620a0c4e00b0078a62a67e2fmr5081544qki.5.1711656126274; Thu, 28 Mar 2024 13:02:06 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <678ba20b-9f1d-41cb-8a25-e716b61ffafe@app.fastmail.com> From: Allen Date: Thu, 28 Mar 2024 13:01:55 -0700 Message-ID: Subject: Re: [PATCH 2/9] dma: Convert from tasklet to BH workqueue To: Arnd Bergmann Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Fri, 29 Mar 2024 08:57:06 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, Ulf Hansson , Oliver Neukum , Duncan Sands , Kunihiko Hayashi , "linux-mmc @ vger . kernel . org" , aubin.constans@microchip.com, Linus Walleij , Frank Li , linux-hyperv@vger.kernel.org, linux-usb@vger.kernel.org, HaraldWelte@viatech.com, Paul Cercueil , linux-tegra@vger.kernel.org, Netdev , maintainers@bluecherrydvr.com, peter.ujfalusi@gmail.com, Manivannan Sadhasivam , linux-riscv@lists.infradead.org, "K. Y. Srinivasan" , Robert Jarzmik , haijie1@huawei.com, Linux-Renesas , Wei Liu , Linux-OMAP , Florian Fainelli , linux-rdma@vger.kernel.org, Viresh Kumar , Jassi Brar , Dexuan Cui , Zhou Wang , Jernej Skrabec , "jh80.chung" , zw@zh-kernel.org, Chen-Yu Tsai , Alan Stern , linux-arm-msm@vger.kernel.org, Orson Zhai , pierre@ossman.eu, linux-mips@vger.kernel.org, Eugeniy.Paltsev@synopsys.com, Patrice Chotard , asahi@lists.linux.dev, brucechang@via.com.tw, Kees Cook , oakad@yahoo.com, Sven Peter , Ray Jui , Sascha Hauer , Sean Wang , linux-actions@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Haojian Zhuang , =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , dmaengine@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, Bao lin Wang , Matthias Brugger , openipmi-developer@lists.sourceforge.net, Mauro Carvalho Chehab , Allen Pais , linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno , Scott Branden , logang@deltatee.com, Bjorn Andersson , Hector Martin , Haiyang Zhang , linux-kernel@vger.kernel.org, Leo Li , Konrad Dybcio , linux-sunxi@lists.linux.dev, Vinod Koul , linux-s390@vger.kernel.org, Masami Hiramatsu , Chunyan Zhang , Tejun Heo , Manuel Lauss , linux-media@vger.kernel.org, Shawn Guo , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Daniel Mack Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" > >> > 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. Thank you. - Allen