Received: by 2002:ab2:6991:0:b0:1f2:fff1:ace7 with SMTP id v17csp197804lqo; Wed, 27 Mar 2024 10:25:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX/2S2UlpL7xEzyS7DfIkKsvbA0WomTSsZhNj8Gk/SwCHGMFL7V510tYlzg5VZ/n+5NMjZ5k27h/y2P8cL02UDgI9Garme9mxWf/Od4hg== X-Google-Smtp-Source: AGHT+IHHr7AIgdyq4yWE7GjIMlZaYj46JM7+cN66tycBJy4UjJdKFPVivO64yBQv9rOpELSUIn4V X-Received: by 2002:a05:6358:341d:b0:17e:d8fe:be45 with SMTP id h29-20020a056358341d00b0017ed8febe45mr15086rwd.8.1711560318779; Wed, 27 Mar 2024 10:25:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711560318; cv=pass; d=google.com; s=arc-20160816; b=N3HTxgW/dxTdrAIemJ+BTRp4KxOiGD7/ATqUIYNp2l5uB4Ei/yXxzgiRRWGqad5pvC RIdXlUA3bTrOnAWmdtxwTNb8qrPCCWavEe/uHj3sxxQbGHVqG2554Egk86YAXeC62YJT 0MLu3yOEgHg1XapyE23vl/iIjgDT1wuUmuphEygULhhdIh8yCxHF5CZUMJlTGXhhtZL4 IRYKAxYqSdk39apy+nj/b5ixQcINIH4g6hJgbrAsgHO+ck+Y+vZ/VFRo6sanBRlF3H1R AOxVC499kHcujPUuNiu0+2Imy3pgqnb8znWAbWA7yZKHTSZqVI4xj2yyz+jM5ZxORu2u oQJQ== 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=yUltN/NJxMhxZV1CH62BOvzy406AgQtlnwGFiPeOm1M=; fh=fgnbnzWg/NVDKp+pwGmTB6dcfJvNipQ05qE5RTA3S74=; b=OGMHEjzlXe8mcOJQZjxdW4ca9eXTaxURbotvNbP5tAkDhaBIruJnTFTKfKBXgX5XKZ 5+zNZU9tAFyl2RRcdJSBhiITDIbARLe6t+UInMvGsYooshWv54tYSgw/9tkofsDRJkuH UoTpnH4xOa51c2crFJY/pCws3g/fZobedQKxBvLoZIb2wTHqoLxxY44A1qRx2UnfS+mI U6Li2bBgnxtyFmRWPbAiJmZTYA2BYoa1kDPy1q7QYaYhRGjOsn/1IgEsR9fdBty91ies w0bz68QM27iMfvApsVWzwWA5tXu9P0lvRopg/MqgUn8qACUewhocIGckrxXX4DntQbSU y6Pw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ckfkJpte; 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-121660-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121660-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 203-20020a6302d4000000b005e43cb2a1ccsi11883864pgc.325.2024.03.27.10.25.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 10:25:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-121660-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ckfkJpte; 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-121660-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121660-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E569AB2B64A for ; Wed, 27 Mar 2024 16:58:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9218414E2D8; Wed, 27 Mar 2024 16:58:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ckfkJpte" Received: from mail-vs1-f42.google.com (mail-vs1-f42.google.com [209.85.217.42]) (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 D1354148835; Wed, 27 Mar 2024 16:58:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711558706; cv=none; b=NamUCOA6s8va22fN1OXqR9cz0GO31GxqzVh4wM4FmWwHTP1ou/QtBcGPzmtsMM/RDky7oG1+l1cNQb5sWYQx1AOPVH+9cuw3906q7OCNAiZLeHwxvv7uAgAJvMGlFmTTLvuectVWX5hIMWTwOow2XSagvX6xQHSqU/XorqiexMs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711558706; c=relaxed/simple; bh=68oAjuOe+OtmBLErtbaq8rH3+7CTr5nb8XNBRGIt+ms=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=B4p2lr+qVpZCC7imiw5JoN5CUaazlBgoNXP5JqJceMvz4+DeHa9uHzyshOCAQaXInYOHmpI0JEnbcY/4Q8X3sKMbdV1gIGGec0YsFUQk187B0bizsVAQcaRgaM5I2oyS/AQb5hSLvmAyeGkIdplgzBGf8Zh1TbtxJHksgPF3/oU= 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=ckfkJpte; arc=none smtp.client-ip=209.85.217.42 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-vs1-f42.google.com with SMTP id ada2fe7eead31-476794adf30so2697024137.1; Wed, 27 Mar 2024 09:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711558704; x=1712163504; 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=yUltN/NJxMhxZV1CH62BOvzy406AgQtlnwGFiPeOm1M=; b=ckfkJpteGm7XCNtho31GGIx7rxeiwCLcEehHDPmagJO6GPaPsWqjOulaA7fSfUpWoR hgUj3obgxGj/lPR48GbOHyNuU2HKlqGvmSHhhUSj5CQy8SsiWlhkwnbzcP9ln2NghDLN mBJH/c8bZdVY7fqCuSfLf9TVA5f8Gsl/zxuFprg8bmtGhe3atKajWGyi1MSWoiFVe5A0 6bBYOndui4T4Jo1unOE4DIHpb0JkW+kc3oCeZundaguc/nPxmxax2GkNBPYa11vHe6cL G1NSBEolZikMOWPAYyQVb16SEbKd7IMl7LVlXZ/hJeQQ1NGF5XsLvcQzWfcHkJpRrEnE F15A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711558704; x=1712163504; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to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NCazfsdzXY5JmW/KALiVNNI8 jT9niDdu7bjt+B7F/fCZVUvTh+FGKWa6rjMt3YBPkRYKHEC7tm7ijuamn90sR/hK0KnWquZCWRl xLvBVC13cU6dkbxwdHXCz3hggp/Y= X-Received: by 2002:a05:6102:3b83:b0:472:64aa:403f with SMTP id z3-20020a0561023b8300b0047264aa403fmr602964vsu.26.1711558703814; Wed, 27 Mar 2024 09:58:23 -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-5-apais@linux.microsoft.com> <2024032753-probable-blatancy-80bf@gregkh> In-Reply-To: <2024032753-probable-blatancy-80bf@gregkh> From: Allen Date: Wed, 27 Mar 2024 09:58:12 -0700 Message-ID: Subject: Re: [PATCH 4/9] USB: Convert from tasklet to BH workqueue To: Greg KH 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, 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, 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" > > 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. > > No it does not, I think your changelog is wrong :( Whoops, sorry about that. I messed up the commit messages. I will fix it in v2. > > > > > 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 > > --- > > drivers/usb/atm/usbatm.c | 55 +++++++++++++++-------------- > > drivers/usb/atm/usbatm.h | 3 +- > > drivers/usb/core/hcd.c | 22 ++++++------ > > drivers/usb/gadget/udc/fsl_qe_udc.c | 21 +++++------ > > drivers/usb/gadget/udc/fsl_qe_udc.h | 4 +-- > > drivers/usb/host/ehci-sched.c | 2 +- > > drivers/usb/host/fhci-hcd.c | 3 +- > > drivers/usb/host/fhci-sched.c | 10 +++--- > > drivers/usb/host/fhci.h | 5 +-- > > drivers/usb/host/xhci-dbgcap.h | 3 +- > > drivers/usb/host/xhci-dbgtty.c | 15 ++++---- > > include/linux/usb/cdc_ncm.h | 2 +- > > include/linux/usb/usbnet.h | 2 +- > > 13 files changed, 76 insertions(+), 71 deletions(-) > > > > diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c > > index 2da6615fbb6f..74849f24e52e 100644 > > --- a/drivers/usb/atm/usbatm.c > > +++ b/drivers/usb/atm/usbatm.c > > @@ -17,7 +17,7 @@ > > * - Removed the limit on the number of devices > > * - Module now autoloads on device plugin > > * - Merged relevant parts of sarlib > > - * - Replaced the kernel thread with a tasklet > > + * - Replaced the kernel thread with a work > > a "work"? will fix the comments. > > > * - New packet transmission code > > * - Changed proc file contents > > * - Fixed all known SMP races > > @@ -68,6 +68,7 @@ > > #include > > #include > > #include > > +#include > > > > #ifdef VERBOSE_DEBUG > > static int usbatm_print_packet(struct usbatm_data *instance, const unsigned char *data, int len); > > @@ -249,7 +250,7 @@ static void usbatm_complete(struct urb *urb) > > /* vdbg("%s: urb 0x%p, status %d, actual_length %d", > > __func__, urb, status, urb->actual_length); */ > > > > - /* Can be invoked from task context, protect against interrupts */ > > + /* Can be invoked from work context, protect against interrupts */ > > "workqueue"? This too seems wrong. > > Same for other comment changes in this patch. Thanks for the quick review, I will fix the comments and send out v2. - Alle > thanks, > > greg k-h >