Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp4950623rwn; Mon, 12 Sep 2022 01:44:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR6l5Ntx+A2ZV3CsFvMRqKhynQArU8URL1mKfVIo1jpMzqrXqYDSeakteCTbZy8vv8zleINI X-Received: by 2002:a63:441b:0:b0:439:103b:25a4 with SMTP id r27-20020a63441b000000b00439103b25a4mr2404676pga.487.1662972249158; Mon, 12 Sep 2022 01:44:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662972249; cv=none; d=google.com; s=arc-20160816; b=vvZbUYUhtpwHXmA7bVAYbMX5366YEkBOnr4cPyrt97HGYso7rlqV6qtDWTs9gQB5B/ lWmGExc/GBAOPj5iILeJ4n5/8P2w3xKPCRcpwLo21TLEz3bmgJtrVFncwwZ27xMj8hCw f5PjHGm2cOTdw8vWUoXbERJzdeBwwhXi8CnpzmRtzb+RhBz51rLYDLcQz32UlPArw9/j GrWw9dBQ6Lk25Q9qnLVd27NLhHnJf9nHR+Auc9BKPByYt9AQQNqBLDU8xAejRsAEHj29 krh9J5vJsPTu16Z/l6vm/Fs4fRcuhoumoa475NV7C6txDiKhSL/0yyPzigOm8STH3/Cf p8fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:mime-version:date:dkim-signature :message-id; bh=TBY/n+1M8LwfiyqrH6vsAKHFwyw47fD1VJdk+JKwca8=; b=FloRczyHfuWJUnPKHYJkfC+IODeofTAGsxdCqxeIvawBzms1iyPBxEE6DvH6ivG6KN JELRWxPVUm+Oh+ThwKe7K9ErNrru0FCO4yt1m6eaVGWjiTHgPNsCgYxlhqYyIW2RlpCS SIc1M6MU2WcuD+HeF1M2u4ZoU6RjEC6QuSwKVV6UMWXH/Zmk0RkmIWN42ShMd0ixS4Oj WDq2kvWxsctHUoRqDvjTPyzKYQFt8ioR1UlUuj7EdwOw8KftlYN9lsdjYK7lePL1Y6C6 UkmDHKRjpVeeio10s4A3I4A00DpzgihGhyAOXoeiOeyGFSoDrnayShgfUZZLrkYs5Upo qACw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lUazoE3O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020aa79565000000b00540a2ff5351si7369416pfq.304.2022.09.12.01.43.57; Mon, 12 Sep 2022 01:44:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lUazoE3O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230181AbiILI2J (ORCPT + 99 others); Mon, 12 Sep 2022 04:28:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229736AbiILI1i (ORCPT ); Mon, 12 Sep 2022 04:27:38 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49D8F32BA7; Mon, 12 Sep 2022 01:26:43 -0700 (PDT) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1662971133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TBY/n+1M8LwfiyqrH6vsAKHFwyw47fD1VJdk+JKwca8=; b=lUazoE3OnpJzoP68QrKoMCIkSrmFo7MoeJxbRPyBf4+3E5q75cN5VpZHyk0LvVo9+EWuRs Coqc27GVxoZyPOfXV7i35UpZbOdgEVx4MP+I6PgvXptFrJ8QD8sHGGgLDleUQJoDZ4AXGg e4bF5hcdXKFK1bKL+SaGEivQSNTpS9Y= Date: Mon, 12 Sep 2022 16:25:24 +0800 MIME-Version: 1.0 Subject: Re: [RFC PATCH 2/7] RDMA/rxe: Convert the triple tasklets to workqueues To: Bart Van Assche , Daisuke Matsuda , linux-rdma@vger.kernel.org, leonro@nvidia.com, jgg@nvidia.com, zyjzyj2000@gmail.com Cc: nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, rpearsonhpe@gmail.com, yangx.jy@fujitsu.com, lizhijian@fujitsu.com, y-goto@fujitsu.com References: <41e5476f4f14a0b77f4a8c3826e3ef943bf7c173.1662461897.git.matsuda-daisuke@fujitsu.com> <0b3366e6-c0ae-7242-5006-b638e629972d@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yanjun Zhu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2022/9/11 23:08, Bart Van Assche 写道: > On 9/11/22 00:10, Yanjun Zhu wrote: >> I also implemented a workqueue for rxe. IMO, can we add a variable to >> decide to use tasklet or workqueue? >> >> If user prefer using tasklet, he can set the variable to use >> tasklet. And the default is tasklet. Set the variable to another >> value to use workqueue. > > I'm in favor of removing all uses of the tasklet mechanism because of > the disadvantages of that mechanism. See also: > * "Eliminating tasklets" (https://lwn.net/Articles/239633/). > * "Modernizing the tasklet API" (https://lwn.net/Articles/830964/). > * Sebastian Andrzej Siewior's opinion about tasklets > (https://lore.kernel.org/all/YvovfXMJQAUBsvBZ@linutronix.de/). Thanks, Bart https://lwn.net/Articles/239633/ is to remove tasklet. But https://lwn.net/Articles/240323/ describes the difference between workqueue and tasklet. I am not sure whether the difference between tasklet and workqueue in the link https://lwn.net/Articles/240323/ is resolved. If you know, please also let me know. And in the link https://lwn.net/Articles/830964/ and https://lore.kernel.org/all/YvovfXMJQAUBsvBZ@linutronix.de/, tasklet can be replaced by workqueue, timers or thread interrupts. " In current kernels, tasklets can be replaced by workqueues, timers, or threaded interrupts. If threaded interrupts are used, the work may just be executed in the interrupt handler itself. Those newer mechanisms do not have the disadvantages of tasklets and should satisfy the same needs, so developers do not see a reason to keep tasklets. It seems that any migration away from tasklets will be done one driver (or subsystem) at a time. For example, Takashi Iwai already reported having the conversion ready for sound drivers. " And in the link https://lore.kernel.org/all/YvovfXMJQAUBsvBZ@linutronix.de/, Sebastian thought that threaded interrupts are a good substitute to tasklet. To me, after I have implemented workqueue in rxe, I did not find any benefits with workqueue. And sometime the latency is worse with workqueue. This is why I do not send the workqueue commits to upstream maillist. I am not sure whether it is a good idea to replace tasklet with workqueue or not. Let me do more readings in linux upstream maillist. Zhu Yanjun > > Thanks, > > Bart. >