Received: by 2002:ab2:6991:0:b0:1f2:fff1:ace7 with SMTP id v17csp225093lqo; Wed, 27 Mar 2024 11:10:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXtR/K3tRmfBgnUF5oTXCMHBWAyGsZAOeA3AGwS5NbZZ5y8ehj2qraGwwKh4PrFU6eKypgl8s99eTbH3a886LFS/DwUeVbOJ7QlSFt7EA== X-Google-Smtp-Source: AGHT+IFnPOCGOua+y264NN9Ac39QOjLyqST8OHExMuZ5OozWKZeDtj4edqG8QtsOcKDWrlIe8E/N X-Received: by 2002:a17:90a:fe93:b0:29d:e004:f8ce with SMTP id co19-20020a17090afe9300b0029de004f8cemr502279pjb.6.1711563027013; Wed, 27 Mar 2024 11:10:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711563027; cv=pass; d=google.com; s=arc-20160816; b=RCzzKnAKoXzMm8nv+vRNDWIf2wlLeT3iaDgLw+Kfx652FkFPSLCgVHEeLFNMxzWGuR ySge7sh1JezGQ7QeaAkppu2kaCo1k+ta4U0FrcZ2DEIWcfLcYXIPDMqOkmo9bA0pK17H Eq1ApGemEjz6R+ZX2UU6upbfn20zd3ywu3/OfAlBqgqrm4bT+/VvwslQLEHUF8ic8Jgw 3hKOyxovAGlEnE1zil6it1+ZpAbuqRd4gJbTwrv67HdSpsJk/iloSRBP3qPpSCEI7CoB LprmVnltzCRhxIqDTtE6wEmqtLj1LCE6MLkiQauD8v+kRqspTvR/1AND6uvvXpTTgTak T6hQ== 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; bh=QOw2NlnXBhvo80NLMmzd6pkkJ3EgPfGkkGtJAd8chaM=; fh=CFjGV7D7PM2M77MTRqRLjWEA42CagaKJXcmZUeLgpjA=; b=MgXpgVAkgmRQYCn57xDG4c/w2nPCvhKztSWiyTVF0WSXoIauPwO7N7TLzSksyjV8d3 yEG8Iv35JuSEGrfcVAbOFlmtkuohaZyisW9UXckQMmOPvhq0EaURvCK2JMECoC9xREW/ 1DizKImEEU2/akZJOi5cSrBSX8WpZh/rk80PW6QFL6SvYPumy0dmf/ZHs2WOV8IRDOD7 G63U0GC0ALc93aN7o1rGZSKBBPBVjXu5ET7tJQQX+O5MDynWWJ0XZBKidIbxWOwDO1st dVBG7jQYd7z7Vx5tQ3AG1pyozyhRbb/0XA0NtXgzLAn/17K5LULL4hxt1rzhb1qrrO8U OR6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-121768-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121768-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bv3-20020a17090af18300b0029bc1c055efsi1870224pjb.185.2024.03.27.11.10.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 11:10:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-121768-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; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-121768-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121768-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu 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 C0FE52A8546 for ; Wed, 27 Mar 2024 18:00:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D75B1509A6; Wed, 27 Mar 2024 17:55:05 +0000 (UTC) Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by smtp.subspace.kernel.org (Postfix) with SMTP id E9A341509A5 for ; Wed, 27 Mar 2024 17:55:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.131.102.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711562104; cv=none; b=s9oAOWECBvOqsfD0XdjObLGBeXscK6IR0wndx0NKqYevOZKJZ7bdTxc024iv6nVgZtBAugy4lB7ovUYPPVfrbsIk3/ie3AD4Pb+xjucHszgdSBCDKRtEcFRtAPcZpWYsrTJR3dCy+O7fkSisDuMQTEfNZ1r1FLFg5t/YuSvlTGU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711562104; c=relaxed/simple; bh=2em/62sKNa2uOySIrx3SPAGa+oAkz9sarrrAbR/FclA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WSIdXesAT9qBkd/yjHYph32Wi780h6VpLP3yH3NtnaJ2q1tpmQxweojTpOmMTczfDtiMt8TXqRvRLJPfSrIgvGtGmI545ugDC+mCXQcfrUTT14dUHsp+hHeLnpgi2g6OB16zimTQzZc0NK05r7PnfHwXfSrdz+0IHyYd3gQcTqE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu; spf=pass smtp.mailfrom=netrider.rowland.org; arc=none smtp.client-ip=192.131.102.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netrider.rowland.org Received: (qmail 935614 invoked by uid 1000); 27 Mar 2024 13:55:00 -0400 Date: Wed, 27 Mar 2024 13:55:00 -0400 From: Alan Stern To: Allen Pais Cc: 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, 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, ulf.hansson@linaro.org, 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, 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 Subject: Re: [PATCH 4/9] USB: Convert from tasklet to BH workqueue Message-ID: <42c445b4-a156-4c43-bf98-bd2a9ac7a4fa@rowland.harvard.edu> References: <20240327160314.9982-1-apais@linux.microsoft.com> <20240327160314.9982-5-apais@linux.microsoft.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: <20240327160314.9982-5-apais@linux.microsoft.com> On Wed, Mar 27, 2024 at 04:03:09PM +0000, Allen Pais wrote: > The only generic interface to execute asynchronously in the BH context is > tasklet; however, it's marked deprecated and has some design flaws. To > replace tasklets, BH workqueue support was recently added. A BH workqueue > behaves similarly to regular workqueues except that the queued work items > are executed in the BH context. > > This patch converts drivers/infiniband/* from tasklet to BH workqueue. > > Based on the work done by Tejun Heo > Branch: https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-6.10 > > Signed-off-by: Allen Pais > --- > diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c > index c0e005670d67..88d8e1c366cd 100644 > --- a/drivers/usb/core/hcd.c > +++ b/drivers/usb/core/hcd.c > @@ -1662,10 +1663,9 @@ static void __usb_hcd_giveback_urb(struct urb *urb) > usb_put_urb(urb); > } > > -static void usb_giveback_urb_bh(struct work_struct *work) > +static void usb_giveback_urb_bh(struct work_struct *t) > { > - struct giveback_urb_bh *bh = > - container_of(work, struct giveback_urb_bh, bh); > + struct giveback_urb_bh *bh = from_work(bh, t, bh); > struct list_head local_list; > > spin_lock_irq(&bh->lock); Is there any reason for this apparently pointless change of a local variable's name? Alan Stern