Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1115169rdb; Tue, 30 Jan 2024 08:17:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGs4w7hq6CifFG6UCnMX9CxBQMFYhMHYkqxomxbz0ZjmMMvqbuwVOfpZWLUARAcIUJWzYj X-Received: by 2002:aa7:84d4:0:b0:6dd:7c0d:3f7 with SMTP id x20-20020aa784d4000000b006dd7c0d03f7mr4752590pfn.1.1706631431999; Tue, 30 Jan 2024 08:17:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706631431; cv=pass; d=google.com; s=arc-20160816; b=BBPaZlHgSyXcsfaprjrzfJ/3vjw7Q2FqFsB4GFIu8RD+zB/h0Gg9HnpEORdM30eZj9 C6kp7R4PxL0dVdfYcrmZpII91YyV8w2TCH2tnQUgb3NzJG2JLQI2n7KYVXadkI1wfGDg 3pK+fRDRZiq5/Kbk56MJqBqqlf5viSz3lpQp4AC23SmKrsIddWITDAVsEDOTVbC75rdi bn0iCjzOX5FbrPUCpEdcu6DN6lTaobFFXtgOlD07hcXONmMCZNb2JX/T++l7H072vg6e nP9QevRsh/28kKpl6m9kfo2UBsflOu/3bBX4B9eJa/LuyEBVAIINot3bIT0aOlsBsaEA /hUg== 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:sender:dkim-signature; bh=XL1Fflhk+Xb40dzgpJerE8E3hGMxHAI4xcbrdBQFd/M=; fh=MKyL3sFgx1hzxsc9zabVQVZHz4jcetOkh8vQTHgdHRU=; b=tmgQ/1Dc/g8mHAv4+ZxxEqKiUvxd71A/rNY91ONZIV1SeZBAyhbLT3ziSB4Klji+tI +EgDeFKuRg8uy5Cz+L8wZBPI6zXXL5033k+GQFZ7CjzkQQXyMgo8zpNaOf6RceQ3Wip7 UIxdm4T5hDTFUJOcD5HuZYJxkFC/7eVxOTIsEy+JxgDB7Zmjrf5zj2gvaFG+zWNz/c0T t164M5NuQiMs+oXK5tr3bMw+cgSHYtmbeFhQ47g+Ovnmj2ip/eRbZIryNUXFUgIYy8bC KODQLIJO9naBpUyAmq5Lt33yEJhiHdzwwUdQwgY1Q4CGgi4SRk0Xqg+dK/GN0TR3BOmh F41g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eH+Yct7B; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-44876-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44876-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u32-20020a056a0009a000b006ddc78331easi7630122pfg.401.2024.01.30.08.17.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 08:17:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44876-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eH+Yct7B; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-44876-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44876-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 629A6B29638 for ; Tue, 30 Jan 2024 15:50:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 86FF185C56; Tue, 30 Jan 2024 15:50:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eH+Yct7B" Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 81E418613E; Tue, 30 Jan 2024 15:50:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706629837; cv=none; b=tGRS1KCK0Xxcu8ijclty+DYADP31cs6oz76o2Ke/qbuZg16afAHbECXTAMxrj/jzsYqCDspZ2j4r1LJVgicfGXVFZXFZTIGD1E+IlBnWbNM+bFode8j47D7pPdmhUBb15GDYMEPBR1WPYCezPC2MocMzRqksarSJRxXAQ7HdzOI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706629837; c=relaxed/simple; bh=QvBaZsLh8DPvYcl3VO8X2y1UuYCG/UYWMaa3pZVysnI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=t0w1ePbXAJwX+MRP0pT0shgH5b1xZW/oOX474GLWCi884VAP4wRui2AX4nr+VZYt58Nl4e2oKxBoJerIgQSOezF6qqM6nfpfIPx8ZGsbcwVA3w7khCGRfC/EKrS5OGSUtC0q/vSnHjsk/Is5dI9io4UIep72sjmtyexie1Muinw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eH+Yct7B; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1d8cea8bb3bso12134065ad.2; Tue, 30 Jan 2024 07:50:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706629834; x=1707234634; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=XL1Fflhk+Xb40dzgpJerE8E3hGMxHAI4xcbrdBQFd/M=; b=eH+Yct7BzuiUCYPqw61A+ywaYaN0Z6mvbZ86gGRPWUjIV2G+hR7aAX1K7lMkvV8exh dcd9DxGWgEMTrchX50UZBJj/4E24i4ggGmpW6xxr0I0s+WoRwzlDtg6MLo2WVpHe8nV+ oXG0Hz5q1zNPpD5FhN+xHsWo3Ya9Db/Y2Z8wtxhrJz4evULygQF0nMV8nzpVaH9QW585 wrtaagWQUj6/xb8TFO0N3Fng8AYiH+KrK77JAeiZ0kCXTzbBiIcAfCJhxCOpYf2T9iOe u7snojzX7fgLQ7IynUqKAyK2fui1AppUHh7Z0dp2MENLbQCaMlHYFlVeftx17KxAbVi7 GziA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706629834; x=1707234634; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XL1Fflhk+Xb40dzgpJerE8E3hGMxHAI4xcbrdBQFd/M=; b=PpM+IiRxgAd86XHK9/k9LsV4QbAi7tLphsZMyVtmJZ6nuSvxajre1k08pK4cE2tZ61 2u0KaARhFxAVyGDrYBzcOw86pIW8LDNwi/PO8RpAVhrrMusSLvfJ3J3G70FJlflWTL31 7UaMAZV5WesHzCw9klSVJFrDh864lz72xf6LnU60lSBjk23QiFX0fgVDB72hm+GfKHor 1Rim0GcWHGy1C2PWfb8Jysh9bSWiOhelhojYrg2gzWIIdGhMy6mgYOe3U3LalCqU+dVo brOXNRI73iQfdnsgJrTAXcGnaKEmF8qpvCVz0k8fsgvLX+T27psHe0DP7+Tt+Zoko648 Er6Q== X-Gm-Message-State: AOJu0Yx4aTqj96zQ9H9o5SvdovYPdsAvonbOXnhtbA6vmPRFLspJfoTN IiXF4JayazmkLPvQQ8ZcgCtnI90nPcAM+jFDztu1ZeYatIanAyzy X-Received: by 2002:a17:903:40c3:b0:1d8:d2b8:446a with SMTP id t3-20020a17090340c300b001d8d2b8446amr5082317pld.27.1706629833562; Tue, 30 Jan 2024 07:50:33 -0800 (PST) Received: from localhost (dhcp-141-239-144-21.hawaiiantel.net. [141.239.144.21]) by smtp.gmail.com with ESMTPSA id c6-20020a170902724600b001d8aadaa7easm6480425pll.96.2024.01.30.07.50.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 07:50:33 -0800 (PST) Sender: Tejun Heo Date: Tue, 30 Jan 2024 05:50:32 -1000 From: Tejun Heo To: Sebastian Andrzej Siewior Cc: torvalds@linux-foundation.org, mpatocka@redhat.com, linux-kernel@vger.kernel.org, dm-devel@lists.linux.dev, msnitzer@redhat.com, ignat@cloudflare.com, damien.lemoal@wdc.com, bob.liu@oracle.com, houtao1@huawei.com, peterz@infradead.org, mingo@kernel.org, netdev@vger.kernel.org, allen.lkml@gmail.com, kernel-team@meta.com, tglx@linutronix.de Subject: Re: [PATCHSET wq/for-6.9] workqueue: Implement BH workqueue and convert several tasklet users Message-ID: References: <20240130091300.2968534-1-tj@kernel.org> <20240130102011.rX9Qjnp1@linutronix.de> 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: <20240130102011.rX9Qjnp1@linutronix.de> Hello, Sebastian. On Tue, Jan 30, 2024 at 11:20:11AM +0100, Sebastian Andrzej Siewior wrote: > If one context creates multiple work item which are then moved to > tasklet I don't see the difference vs workqueue with a bh_disable() > around it. The main difference is that it avoids scheduling latencies in scenarios where softirq isn't heavily loaded. > Looking at the USB changes, I would prefer to see it converted to > threaded interrupts instead of using tasklet or workqueue. Both > approaches (current tasklet, suggested workqueue) lose the original > context where the request was created. Having threaded interrupts would > allow to keep everything in the same "context" so you could prioritize > according to your needs. That's great. If threaded IRQs or even regular workqueues are suitable, that should be fine. This conversion is just targeted at the use cases which can benefit from executing in the softirq context. Thanks. -- tejun