Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1966037lqz; Tue, 2 Apr 2024 03:17:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVRbpxvGZwpR/vjC/HzT9rbId1dMes0c8k7zsBA36BH3UWkqHgQ/l4ywuJPnUb6N1vTis5XDXoTr65DsZkOUkInEgSG8M157q8L+S5k6Q== X-Google-Smtp-Source: AGHT+IHDPiRpCSFT5GgTihN4fZPnH3ws+asU37nHLC7Rjx7LocoJTpxOltVBBf0Qrgm+xnkhdFQA X-Received: by 2002:a05:6a20:734b:b0:1a3:adce:f159 with SMTP id v11-20020a056a20734b00b001a3adcef159mr11952161pzc.41.1712053046100; Tue, 02 Apr 2024 03:17:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712053046; cv=pass; d=google.com; s=arc-20160816; b=f2zNQNxXXO0DHmxiw6YGf9YnmuXMbsECgQ1ehfAdkr+uIe64/hUXwawI0tzmMbQ9XQ eFU3ZEu400YuVtOrZfTpUic0XhLqqOqe1kL7XCsljXOKGR/uxUZav8zcbr4K6Nhl5258 K/vwAE62LOyTxEpRLJ8PWba+wttfaRNLTg1zuPBP6GbxEFWNkx8rI0N/9NdNOgCwsEs7 F8yhfr9vdZNqM4hK77o1d25ki6pfBBtWmLC9JGyu23NaWloaKjMjXZpZk8EPxnW/6Jx5 kZE1pFv7o3YfcmEbzdV8wx7Pur5sMWGCMVSXNRa4GpMdB9WvmfPzsdbJ/S4EKwChZmVp 1ODA== 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=uzac7wtIrnnrBvtOLPs8xaD+ikoHcCxqEerEJoMcBFs=; fh=FcH8IGnxqiDo+Zamza4tj6XGFSGNpQj/YizA/6EMtts=; b=GUVpHESSX4PH3M0A3xB6rsbtAkt+XWgJZw8oH7jcbUIsUcWS85jkMB615xpmeFSe0i thm45KxsyO4ObA5ebItQ9fnGk8cPdWe0yLOQb4kN9+iFbjW6TibXi3qGxIfpZo2fOro7 YXaHbewiERhn+moVVAHxTA8i72enSdKj2ibdpdYwlhwVsFcYFIz1M0C50cJZddDavMhl wrcZ+/ow7IUWEofjRK7PAcElrVX0GBpjY2YgHnURKdBVcupAQ8/8vdhQZX0DYHE177mU vT01F+2WmbLaOPqz26k7YdE9ikDITO8/THcpLtqgJNz4bFxreLfVnALONdjKgw89fK3z 4Vmg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="P/19zu7H"; 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-127710-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127710-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id nl17-20020a17090b385100b002a2368a1496si4608643pjb.51.2024.04.02.03.17.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 03:17:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127710-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=@linaro.org header.s=google header.b="P/19zu7H"; 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-127710-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127710-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BEB6A2849C7 for ; Tue, 2 Apr 2024 10:17:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB0D75FB9C; Tue, 2 Apr 2024 10:16:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="P/19zu7H" Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) (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 30B5E5FBA0 for ; Tue, 2 Apr 2024 10:16:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712052986; cv=none; b=odwGomG2XzgZ3qZOvNScQZyFSswUson5YFUcViqU0s6oG+iOgZk98qvaV82SF3e4GU/iW41LTGtV8yrziO1tf4/J/iNLqvVNaejjCiIMhWsI3kkN56jZpvwpKEkQxY1vseqGE9OfNSVryhbMqfdkg3uKBc2WmwKck14m6syGrhg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712052986; c=relaxed/simple; bh=uzac7wtIrnnrBvtOLPs8xaD+ikoHcCxqEerEJoMcBFs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=jSgveFIfu9orp9RXXglTwqFeqfCO3WFyHK2guOMwc9VrEf/jkpGY1A8Muiq7ST+QLPLuccUdpVvTaoWWN2Mwg8my+l8qiq+E94vmWH1aszsXeOBxxNYRezoDjtenIIzzh9rXA38G5uNb+Ul6vvdRGs1wJWHDIvf25fiiC/ZWLGg= 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=P/19zu7H; arc=none smtp.client-ip=209.85.219.176 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-f176.google.com with SMTP id 3f1490d57ef6-dcbd1d4904dso4576661276.3 for ; Tue, 02 Apr 2024 03:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712052982; x=1712657782; 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=uzac7wtIrnnrBvtOLPs8xaD+ikoHcCxqEerEJoMcBFs=; b=P/19zu7HhxbqaSZ6tddIYer72gYo22iX74gtm9EbTCsCnmBPVJH56wwx8ina7pHQt+ p316gGtpPFNSmMfwYWkooiGf4ik567MMKWJ1fJRb+NnesXmt8S3KOmo1hW/O3yH2uIjf F3SkY7DH8iAQRrcIIOMQyR6tAgVMpinRoEFcTiHyz/45wguXP951zWOOFOEZRV1uWbyn hNrtfhYos8BjukR2a9x7YTIu1mvVMtxWlxNTeXM3ZTuCTXqrHvRkpW0RunoXYl2P2zer H5n509H2Aw3xqdmsadb2X73YaIOldxZWd5/O5TrVs5Wt5fl9C6M1vCFRqYXRh0oRA0v7 HRhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712052982; x=1712657782; 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=uzac7wtIrnnrBvtOLPs8xaD+ikoHcCxqEerEJoMcBFs=; b=luyAw/bvL3tfCFwghsjqW2aqntY5LO5vem4mJnxv6n89HkLdJN7eu2+duEwBmY67FP h3nOFBGOEYt8ZfmMv+nszVNiqDBIrxD4XlFDlZpGbenWl3XwGzUepWHvLEynp/n9qnF4 MxnRFY96rliSgkR23xXyzdN48F2jqE2GtpQ6M9dfdMQdpw81a/zKSe/uLjV0JQkv0mU+ J0UVJMEErpT6Jk4MW9xFD5U+P29jMi2aVaPwA/t4Yt6UFvidzkYjKCr8GMBBbir5EtQZ 6Sz6rrRML9+M+cCIw+8chBUbHFw+CIS26DACLHp68IFXJan8HMFPlZni+p/QD8nzz2mT BSTQ== X-Forwarded-Encrypted: i=1; AJvYcCX+1yez1iEMuJz31KAtopkyjStv/vyTdVbkBGj/9JSA3IrbVoA5fmzJMUfY3O3ZzKleDniVPpAH+12cvGzH2EnG3pwVFk4Mtfbb5LT5 X-Gm-Message-State: AOJu0YyiRlBAUgnvndBe/S5JXrAqCjlgl1yJAP0/+2NwQFAFjOZJ8xn8 9+ZcwlSHucu6Jrd8ltyUyKK6OnBJppB22fQ4H7hnmlmvOhdzTYFEY0h1wX/7bH8f+bel9rgjVhU 8TNr9PLJC2coprlrcI/X2KUbppaLdugPL7lUjHw== X-Received: by 2002:a25:b191:0:b0:dcd:b034:b504 with SMTP id h17-20020a25b191000000b00dcdb034b504mr9487652ybj.27.1712052982018; Tue, 02 Apr 2024 03:16:22 -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: Ulf Hansson Date: Tue, 2 Apr 2024 12:15:45 +0200 Message-ID: Subject: Re: [PATCH 9/9] mmc: Convert from tasklet to BH workqueue To: Tejun Heo Cc: Allen Pais , linux-kernel@vger.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, linus.walleij@linaro.org, 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" On Thu, 28 Mar 2024 at 17:21, Tejun Heo wrote: > > Hello, > > On Thu, Mar 28, 2024 at 01:53:25PM +0100, 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? > > BH workqueues should behave about the same as tasklets which have more > limited interface and is subtly broken in an expensive-to-fix way (around > freeing in-flight work item), so the plan is to replace tasklets with BH > workqueues and remove tasklets from the kernel. Seems like a good approach! > > The [dis]advantages of BH workqueues over threaded IRQs or regular threaded > workqueues are the same as when you compare them to tasklets. No thread > switching overhead, so latencies will be a bit tighter. Wheteher that > actually matters really depends on the use case. Here, the biggest advantage > is that it's mostly interchangeable with tasklets and can thus be swapped > easily. Right, thanks for clarifying! However, the main question is then - if/when it makes sense to use the BH workqueue for an mmc host driver. Unless there are some HW limitations, a threaded irq handler should be sufficient, I think. That said, moving to threaded irq handlers is a different topic and doesn't prevent us from moving to BH workqueues as it seems like a step in the right direction. Kind regards Uffe