Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp435472lqh; Thu, 28 Mar 2024 06:37:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVbAwY9+l9aIEIE6nwp1QGGBI2vt6qbg6PDKfGZuTWUMEd+yfLK1Fu/DjJtO7wDBUtANWtaSzDrscEpvfOKgkMaSGA1F3GQS7aOFeJ59g== X-Google-Smtp-Source: AGHT+IEWCHLyvSOHVdrSJJDuPcsvQxk65Xo2uMgCxnzRhVcD6wp4oBgACLrUEGEb3Yl9y7mUwr1y X-Received: by 2002:a50:ab1d:0:b0:568:a792:276 with SMTP id s29-20020a50ab1d000000b00568a7920276mr2642151edc.7.1711633069668; Thu, 28 Mar 2024 06:37:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711633069; cv=pass; d=google.com; s=arc-20160816; b=xkrmKLMQ6c0sjjiqalC9YCNseOZtk8d57GPTSsbizNQUMBbYUPepSFsWunMsKwFSvD XlkiyDVgk5XlsoWKT9xmJsKYs8kjEvi0l+rMZ7yBHh9E8KbN58Mbho+edsJIOYzsZoBN UaK4Ext7gW3AO+uijoZ7nlfXmV9Me7fm4k5Lfgr5R9tRHgHOO4/owly6IGInmMOFrta4 I2z67c8N2IedM0eLLSJPB2t/uqVnPJpgs5s8x7fUPXvzFsse7i5GWQOYGJqndYYlZ/+v R9DVNdz2fgUbQs1OWQIdjOKEjXptw+BeMpv3uOPJW7PqxdfLXR73MuD3WEyQSJGQE2/K cJNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=vhptj9/Vq4Rm0PoGzxaGiCJqIgDUZwkAbXDvc9ksjDI=; fh=nNM/oLwLzUNpxp18dUpieVvuuydseL8yEBdjb+oRfBk=; b=RJaMQYT9i9SU0k6api/uUsm9WSG3UDidREKyo2R8ycLp8ow5rYPL/DN2GYy2CQkGBq C43INv3OEyy+y2Jkd5W6de8t3Hv74WD93OOnhAXe2DFx1zkmXjdzw1JuzZ+Lmurk+yw8 uhMKH+YaLzBEao0yEInvYff2asJlQadPDmgwipv+CHzH4xiDDqFWHpEumLhiijI2qgz8 E+tguoPp6sMklWSc8pxSC+1+NUXbYvLmwxKCvli84H82Fk9Bv42sc1uJ7zWviIR4Swjd x8Gi9UBaHacAQsBKFVabE7WjyV2pM0VqwxQaXuL2OqsDayylRz4MZr4rcbIkax5/kCxm z15Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gquCu54b; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-122962-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ew4-20020a056402538400b0056c19240503si773552edb.684.2024.03.28.06.37.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 06:37:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122962-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gquCu54b; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-122962-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3EE281F23C5D for ; Thu, 28 Mar 2024 13:37:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E19881ADE; Thu, 28 Mar 2024 13:37:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gquCu54b" Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com [209.85.219.171]) (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 B544D7F7CE for ; Thu, 28 Mar 2024 13:37:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711633045; cv=none; b=f7zxGGA7oqpv9E7sxGhuR18FnTLuBWbvhSnsDn5mm/qSyayTX5C5mCUUrot3AHC+i3z8ANIHlgmHWZjUL8DoN2uUaEKc2jPCvs7QI+gu3Qh1U5xkBHRAonoeIr1h8eIlnqW4XlKmzSUpVi6QXelm59U75BabboIG2dCEPqCoEiI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711633045; c=relaxed/simple; bh=vhptj9/Vq4Rm0PoGzxaGiCJqIgDUZwkAbXDvc9ksjDI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=AgN6inN/ovWlrjJszV3kOk9Gb1jIBPa0jYUZNi3OGakT8xG0bzJipNNDl0lRViN+cSJthN3n8PyMIrfYShxRNrta+z2yqrwCf9ULwx7d2dZYlCdr32Av9KkCljuanvikuF/ZzXfBTv8BRdyTKmy9/VZ7zp13K4SUpLP5oZBKYg0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=gquCu54b; arc=none smtp.client-ip=209.85.219.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f171.google.com with SMTP id 3f1490d57ef6-d9b9adaf291so897397276.1 for ; Thu, 28 Mar 2024 06:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711633042; x=1712237842; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vhptj9/Vq4Rm0PoGzxaGiCJqIgDUZwkAbXDvc9ksjDI=; b=gquCu54b7my9LLg/q4oPnqkKhGJwkL7ltG07Je+mkXnkO0tce3QQpinYIyA7vcMP/8 Sauy3czMzIHrSZ3M3UhQ+GugaxC245fv7DBzi8sGuKlDvKv23NV1VgjUUzcezwu/i0ml 3HrBrO9F758spxgQNWF+Ci5uC4PqVuJlKBak5mCFxHIhRfXo6w6Nmf2on3E6OtKniUNV LT+M+VYkCIqd8Ya+BOtEl1V3iANk+gyZjZ1mB7ci4WB+l2OjnJnP7F4pH66J5T09vOM3 DIs8FWa5IPBud/6lNqR+RP9dQvkjXcvuHeTQr6oNe2jFd3rTU0IALrzYHbQvhymkZzQM YC1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711633042; x=1712237842; h=content-transfer-encoding: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=vhptj9/Vq4Rm0PoGzxaGiCJqIgDUZwkAbXDvc9ksjDI=; b=V21Pz/LjjBb1OjE56lJ8T3tyUQM3VlA6Pdh8pktA3LCutyGGy46KmlqBQ8oTm93jsp +4EKh6oV8l4fSCDddunLt4VhkxUage2u+Dq32fYLW97xXdjU2ymYhVUh2xDq86XCUiVC KmkF7DTDCZTO2UKCVNHya521uY0ptNy/mggwljWnkFRE2y6LQm4XJlQTbEnDjqAxfrFA icnCyw/0X7YIexRYUsaUgUZYspl3TBBOCRKBbSe/qiocA8S5R6LficKBPLfS0pGlSFqp yYhZssGMOvwjWNVYfyekxeCk6QbX2BoiC6TURh0a2ZIhr1nUFkyu7O9ArkTbVOEkxu6v x/lQ== X-Forwarded-Encrypted: i=1; AJvYcCWtKtHXunM0dbYsQyzhFtveB/LWEH4zYJ81R0lS3+sPbjFqpv52mJEbaG+ZmMZgX4VSvk7sCyKEY4UNC2r22qaLfkxchCfHsk5/d3F/ X-Gm-Message-State: AOJu0YyFP+66hIQN2GzLECiODYITrMwwnlE7oUTnVwETRFu/MwNQPPLy nZOAvPlhDKotbZeoH8mG1wZ21a5J7VqhlxGYzDhBLY7NWV4oooiYa3F2z54vWdF65KVFkdfWAqd +Exz+iuypvRr7jnRSgxcUuPZ/7vAvrc4xlOYXlw== X-Received: by 2002:a25:b9ca:0:b0:dd1:3cc1:5352 with SMTP id y10-20020a25b9ca000000b00dd13cc15352mr2820459ybj.15.1711633040798; Thu, 28 Mar 2024 06:37:20 -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-10-apais@linux.microsoft.com> In-Reply-To: From: Linus Walleij Date: Thu, 28 Mar 2024 14:37:09 +0100 Message-ID: Subject: Re: [PATCH 9/9] mmc: Convert from tasklet to BH workqueue To: Ulf Hansson Cc: Allen Pais , linux-kernel@vger.kernel.org, tj@kernel.org, keescook@chromium.org, vkoul@kernel.org, marcan@marcan.st, sven@svenpeter.dev, florian.fainelli@broadcom.com, rjui@broadcom.com, sbranden@broadcom.com, paul@crapouillou.net, Eugeniy.Paltsev@synopsys.com, manivannan.sadhasivam@linaro.org, vireshk@kernel.org, Frank.Li@nxp.com, leoyang.li@nxp.com, zw@zh-kernel.org, wangzhou1@hisilicon.com, haijie1@huawei.com, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, afaerber@suse.de, logang@deltatee.com, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, andersson@kernel.org, konrad.dybcio@linaro.org, orsonzhai@gmail.com, baolin.wang@linux.alibaba.com, zhang.lyra@gmail.com, patrice.chotard@foss.st.com, wens@csie.org, jernej.skrabec@gmail.com, peter.ujfalusi@gmail.com, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, jassisinghbrar@gmail.com, mchehab@kernel.org, maintainers@bluecherrydvr.com, aubin.constans@microchip.com, manuel.lauss@gmail.com, mirq-linux@rere.qmqm.pl, jh80.chung@samsung.com, oakad@yahoo.com, hayashi.kunihiko@socionext.com, mhiramat@kernel.org, brucechang@via.com.tw, HaraldWelte@viatech.com, pierre@ossman.eu, duncan.sands@free.fr, stern@rowland.harvard.edu, oneukum@suse.com, 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@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-usb@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Mar 28, 2024 at 1:54=E2=80=AFPM Ulf Hansson wrote: > At this point we have suggested to drivers to switch to use threaded > irq handlers (and regular work queues if needed too). That said, > what's the benefit of using the BH work queue? Context: https://lwn.net/Articles/960041/ "Tasklets, in particular, remain because they offer lower latency than workqueues which, since they must go through the CPU scheduler, can take longer to execute a deferred-work item." The BH WQ is controlled by a software IRQ and quicker than an ordinary work item. I don't know if this little latency could actually affect any MMC device, I doubt it. The other benefit IIUC is that it is easy to mechanically rewrite tasklets to BH workqueues and be sure that it is as fast as the tasklet, if you want to switch to threaded IRQ handlers or proper work, you need to write a lot of elaborate code and test it (preferably on real hardware). Yours, Linus Walleij