Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp2101767lqe; Tue, 9 Apr 2024 09:31:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVlsZgZz1EQ46RvYmHIYIEYhLfstfquPepqxjTgn2JwD7O1E6etv0AQp6Q1mJxojYei++5bjH5+ZkrFuE7Z5CRSyw2NFACIVxgV0/2t8w== X-Google-Smtp-Source: AGHT+IGFJxyIuPTdBRwthzBB0aaJAt0QFHUki2Zwkfg7KB4uHoxW0K/E0sA3nnOnXUzjy+Ylr9Ym X-Received: by 2002:a17:90a:9102:b0:2a2:c127:5aed with SMTP id k2-20020a17090a910200b002a2c1275aedmr243678pjo.0.1712680270060; Tue, 09 Apr 2024 09:31:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712680270; cv=pass; d=google.com; s=arc-20160816; b=D98XqsWAVjV/K+j+K8WgXixCjES+267+ZfCbxxJbocJUyC1/lL/n87g53QLjdO71kx +Qsb+wDUixvR3qmpeWQcy3mtKTyKBPa3Kz+1IxDD68MEF1AaLQLuPE/jQh8gZLZJg+3j n11ullQHoFJncqSsZA5Ep+vfbBZ6wVcFhX80/YAjgzLYiab8tv8LOPdWx/2EawQ7HxNK LwfIkMFhCQ5JvtGEN7zmr7PdNNoMD3LPI4g9ZNoVi4SBOw92WBaBB3Iu01ey1h94+R0P W4L38kUpUc0XZV4x72yk5bDGww4eJyDp5QOBSBzq4e7wHSX3Ti0uTuJQQaMpMekqZQCQ AFlA== 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=eAvKh6eqc1wAK0+874dWwmF7seYGKqPybSL7QY7bLNg=; fh=DSqJ+SQ7Ch/M+EAg8uEXj7J6P5NvhhRPnSHTHVCzOmA=; b=dSEyUBnF57KtfJo1sOUT2KpnDUNXyP0nnXqdOdiKzH6GXBGVDboP1gTpl6CGZxMK8n K+nzXa71w6zeguzoWedx0KeT5aYZz6gKD7hskrEGAgLLMfKEtEzlArwcJEq1h8ClKhtO bOMu3v9u5d5bowmLslpHFe9AXai3o1voiRx+qJh0WAOah7uxDp08ERS7lTAqh7wU524/ D0kMsp2fWSJR3MIOXtlT4Ydvn0jeR7NX4E55LiI8XBqJvmDkMhq2oBeWcXA3uoS4wr3o JCTVc8Lz8CVX4GiKOJ2WhAGc3FT2rS5uR84sk3D2OFH0sBcwq/PwTElICwtCMVhFTOzo EKog==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BjzMzTx8; 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-137263-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137263-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. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q66-20020a17090a17c800b002a2a9d5430asi11111379pja.29.2024.04.09.09.31.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 09:31:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137263-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=BjzMzTx8; 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-137263-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137263-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 877FCB36404 for ; Tue, 9 Apr 2024 15:49:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4971A139583; Tue, 9 Apr 2024 15:48:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BjzMzTx8" Received: from mail-ua1-f47.google.com (mail-ua1-f47.google.com [209.85.222.47]) (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 0D7BD135A6C; Tue, 9 Apr 2024 15:48:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712677707; cv=none; b=qnB9QcQd9luUe2pDAAqcaappS61K2MugXiWueamM+7VQPtWVxrvIhNsoJZMaMjlW4BTFqJlgL6tWBUR556zKfAJIODmfGXVGbiNv2/D5rNR36stsQlxIXgyTmH1ZQXIA6NIKa1Qen7Ek7hh7ZzgjRL3irkQcJGbbSaC1MS2qaVw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712677707; c=relaxed/simple; bh=eAvKh6eqc1wAK0+874dWwmF7seYGKqPybSL7QY7bLNg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=FbJw+2J5WgJc+iQRJaQ/oaWqQUbshILaL+xwOnTkkSXhYMlpN9ZDimnaEjd46X+f02/dFElSZStYgjnKikaLaE+UoiTHgOsGrIqmtKk8Opf0OUcg453scWS5C+yz+/hhlANObdglqLnVRrP4ra971u6imRcX1rcyIOFZ50z3560= 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=BjzMzTx8; arc=none smtp.client-ip=209.85.222.47 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-ua1-f47.google.com with SMTP id a1e0cc1a2514c-7e3c4736d6dso1149045241.2; Tue, 09 Apr 2024 08:48:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712677705; x=1713282505; 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=eAvKh6eqc1wAK0+874dWwmF7seYGKqPybSL7QY7bLNg=; b=BjzMzTx87/3YpS288k9v2S7RDYo/4j47YPreIAqjQ5F4wVbf0o3w/bgcDBLiEI6/8U 4sKNNZl0WrbzVm/cnFXiaqSwnt+OhmwrOPeiZQE7jBD+XkNkqR63cpAMJZI6hm/f8P5m jO4MAn97DKWlgjns8vyWAPNn4HFS4UMFM65Bcnx7YD2/rsUMWm69ExLW084c+uBhsraG wPuQcDatVTaIZZ4uY2hRWfpwlkICpxwqz/1fgEmLH6hJEcydsai3etwFCtg7q6Oo6Z1G YC2CoxQTIss2qry5k4yIRigiBZU3dlnv1KRLYgBktO0GS9FTKfjpmzKXrjwBSaqZZEQt Uobg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712677705; x=1713282505; 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=eAvKh6eqc1wAK0+874dWwmF7seYGKqPybSL7QY7bLNg=; b=Pou9lvB8NWLuNOE8Ym6X5o9KMku3BC9g1U2JCP9tfrGchfI543+2dtOmrnduVnhkrs AF6zNVfPca0bZlQ9t2HWWSvz6f0RuUnnJ8TxnMUC/e2n2HE6X2lX8lQCcw1yCn1ryTZO v5Y0kY77gQuA0t7bKbatzHN+a9+SVqzNWU9Kc2TLfpOWfS9stDYjaw1ZQGUQHT0jFJK/ LNgLgPSNYxcS0db7ah6k0Kk0/mplSNVkAuIup6ohkKxnxqh8EHpzXoBxOqLDhqj/a3A9 FaemgOItbnpwal4Z0N1rZhA6+vheQMmVz8/fxiAg4u7Rzq1AsWPT/Q4qNca/Jp0Yw7Er Yy4g== X-Forwarded-Encrypted: i=1; AJvYcCULguOf1+HQgSAXO0CQN/Rv+lTq0qbmW2omjT07hxExGE6IGLJD97tzQ1C/5kBwOWXpufd8wR8YE/uVcIYcbvgUN6Kdn6Vrbdax8a0kNx2FnLwn0mvsz7j4p+rw3Z8H0+4wcwbZiiA6I2OS X-Gm-Message-State: AOJu0YwjEGJDRIab+n3vcwMGrGY+rVmCSW2ktsd3vqJgnIYv3fPSmozS BDeHI3ftbR/zySeZExXtGFOC0Ea01UEbgIa+bkylSsvJiDVh23yRvFi4wVSEYjUV8Ne3M48hrIJ QTPPiF7rET4/af51H3YDyPpAPOiM= X-Received: by 2002:a05:6122:2016:b0:4da:a82e:95f5 with SMTP id l22-20020a056122201600b004daa82e95f5mr284978vkd.5.1712677704783; Tue, 09 Apr 2024 08:48:24 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240403161559.19970-1-apais@linux.microsoft.com> <3358869b-db3a-40f3-b02b-4f1b46d5d724@kernel.org> In-Reply-To: <3358869b-db3a-40f3-b02b-4f1b46d5d724@kernel.org> From: Allen Date: Tue, 9 Apr 2024 08:48:12 -0700 Message-ID: Subject: Re: [PATCH] tty: Convert from tasklet to BH workqueue To: Jiri Slaby Cc: Allen Pais , linux-kernel@vger.kernel.org, tj@kernel.org, keescook@chromium.org, gregkh@linuxfoundation.org, richard.genoud@gmail.com, linux-serial@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/tty/* from tasklet to BH workqueue. > > Quickly looking into the changes, could you also elaborate why not to > convert most (all?) of them to (non-BH) wq? Or threaded IRQs. Much of > the code comes from the pre-WQ era. > You are right. The idea I had was to convert every instance of tasklet to bh workqueues in the kernel. I will send out a v2, which will use threaded IRQ's. Thanks.