Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp683862lqh; Thu, 28 Mar 2024 13:03:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVlGAmAUmVLYf24g0HeLmiap6a7B9+Ov5z7wNFC1K5U8hH75Zos0U/d1u0946XuA6oGZvofknr4xGtBlYfd1AguUsLwuM+I71U2BW3FuQ== X-Google-Smtp-Source: AGHT+IFx0He8xgNPhcrzQmF1CCSXiDZPJLft6RPwJpEn2goybrZmEf5XXGqt+cZZV1ckUgOUpmOo X-Received: by 2002:a17:903:22cf:b0:1e0:73d:9172 with SMTP id y15-20020a17090322cf00b001e0073d9172mr5048124plg.23.1711656201592; Thu, 28 Mar 2024 13:03:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711656201; cv=pass; d=google.com; s=arc-20160816; b=L2Ocawdp2bjA2IV3yfitFpEw6d1V7a7vRMOM8DF936le1C3morTV008l8JCUftFOr6 NZqYk91AdTefiDDJOxMPpe/2qcmjsu+ztA2vwKB2r82c2Oyxrd2jtygpidFSwSSkH+28 UvSlrAL6JeCe3RhX3EwfFPGMzqSDqtsY5E3sY/KEVDdAxFYJTxfcd7rUZ+Wg1iKPjGkv eDItirD7J62bwvQBBxaNsohvlCLcUKTIqegOud1p6Dzfc/LSXjA2+DNA7uQzA9AfKV/2 c5VsvnnzB07OEe7cF6yP4D1BthpgOV+aAkdGIiIZouIqBhxFqxdQfhjx1eK++Y58qPx3 EEvw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=lQZIemFmXjC6xyiLulQ43Ea/EhoY/GbG4RXFhJQU0/8=; fh=Ht5OGtOKbbGIwgHKmXOiqyUpbLWF2xdQizOkTyL29DM=; b=Rww+tsuEeb+cX/00FnCL2c+KFSoxGcXjc7x1UwiVfUmGCSYF6uFWmvPTr2R7BQKtM6 cIlWeOvTINklfYjPlejG4jvhMNvYK5OQocNvWavNoMgx4LFHsWEQbYv08kJqT5VXFxAA 2WrbPaIrqy4a3h1Dxmd3bc2zPXjS3rgXROPqC469hbK2DIpPS6F8siR4lYM9/JbVK0Nl dM+7CHYV9+Bp0yP7XN8JVE47A+fZ1X+y2GqJ8Rq6zJ0baZd83KD3iUh/5hbQNQ17yY4l /sL311xN2ab/2MnpMILnKgonfdv8N4xGerqLndUkqsVz2M/8Tc47oCnRbeB9guy6MgdW FH+w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MnFeXEgR; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-123539-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123539-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b6-20020a170902650600b001e0e236fe34si1976884plk.364.2024.03.28.13.03.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 13:03:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123539-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MnFeXEgR; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-123539-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123539-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E088929B1E1 for ; Thu, 28 Mar 2024 20:02:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D4CD13A3E8; Thu, 28 Mar 2024 20:02:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MnFeXEgR" Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FAE61386A3; Thu, 28 Mar 2024 20:02:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711656129; cv=none; b=i2zazoDTWaJ+6MLHup7TFr8mzieYqWXiKSqhmuRE8whDzvNM5moDrLnA5iTtntp6lh5hbpHHT7Cf513ObGPScB1GEyxgE5MBS+GckX0UkagcFfO4WU4l381154kCm8FUZA6MQnjFtB72tDWzwD/fN1qVnY7pnEgFZTD2NriNav8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711656129; c=relaxed/simple; bh=vbVoj5mONYHNgf9JQ9GQnrB9tevCRqpIKROsT3wC2Fk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=aQDn780sZYebxjKuWtxtArXsoQWS8YUE2abjTwhaNi3kbxUgwTAWELPJ4cIkHFTfMmNmqLcNLjLU3rLSJs5enN7TARthl/qriO+GyTaTGZen/evS6B+ykAw9On6aihH6BOloC174SLUXGK0H0/X94B65tsXsx2iknOTJm2nJjYU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MnFeXEgR; arc=none smtp.client-ip=209.85.222.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-78bbed7adaaso62353085a.0; Thu, 28 Mar 2024 13:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711656126; x=1712260926; darn=vger.kernel.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=MnFeXEgRmJ8f/Thf359xa0PfiBqvx125ew/dpKNWEckOjf+6AdypIilBzVHgmUxEB8 j/cK6vSO/lus03UI2oeny9YgY2tG255XXyfkePANTbNipm3m9ifqWOVyecfIecWIfTpc 7i4bmaI5QKpg9+xrUptRwlLzDXTR257RcAZUMgeZLInnagtlfVgsSZnnEPVAYg8kEGOU C1h3kCzgYWjPoO+XBGKACSt9Dlq571mr1I0iYroLoSPuaSX8x/6h+cKRNoMOmDVxan3a W6FK82S7VSZf36gvXV89NWkjuU2y2q9EGzU4UiIsjze2gfYHYL25kHnUR6CCS12s8k3h tAlA== 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: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i2QAwcQedg1c/WcRSZ1+fGt j09Clmr3sygLEyltgYhZcU2vxs9wgVTl74VjDweQ2kNKYEzV4Hyp4PrxpW1l13qRWESm5VfH14K tDzhUbwUTq933fg/SNrczhExWjyQ= 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Cc: Vinod Koul , 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 , =?UTF-8?Q?Andreas_F=C3=A4rber?= , 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 Content-Type: text/plain; charset="UTF-8" > >> > 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