Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp4945764rwn; Mon, 12 Sep 2022 01:38:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR4w38o0im+stpVNmBoHaT08Wg4rpbFrh6/rdFMNr5b/f+u2+zY5SLyhlF+0Ieq10sb8WQXm X-Received: by 2002:a63:4816:0:b0:438:aece:3738 with SMTP id v22-20020a634816000000b00438aece3738mr9867344pga.279.1662971891226; Mon, 12 Sep 2022 01:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662971891; cv=none; d=google.com; s=arc-20160816; b=cHppAw8rshN2CEHtZbVvGhmwym7VgXfEQAZqrhoKEsit/f1MCbK+11TUHkA7541Fq6 fNFGSXH8G+1G1eRF7gIG7+/HaPKqCMZoQ/8CMPUHYC97vSfcULT0bFdTXi/5BJ9iVx8F hXSDIQhAZGGAumDtMipGsh7/eIgRSv1tAOkYV6cIeJAXwEjkJ08jwMrXlEJVrg9iMN1c QimW3XorYpicDTjjXBIFMEt0RUY6HeDl9UDSWtwZQH4+HeLn55szSmmixvh2ixbEYYgs 4MFXVlNeI8++69GDSgXmc8/AgCMYeoFBak70bhG0q3GQC1fK/gKqEOUYci7hBzTGQiYd B3og== 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=Ko/M01mjxRdaswWjLV+NEVwlojpcTrguLl8c9fDwroI=; b=kHx73diPiaA3V/LXLE9OOx17v0epY5lEdxrimJaCJAKn5swXzEBWhDUmoSRX6Y63QO sgGErxXuKUFxKDvvcOKuOZMqOCofiMJ2/WEnNUEgsygvUv5rHIaau3KrPQRGfjTZfSAL Em9k0DvYJD/LFHXWJ3+3yejU/M0I4BjxPv9T2nBXvjU/Kkk0YSF/X7vGhR28/NligO+0 CgsNlG7KETuTJeG7o/Xt/44q/Iyf9t0A8Aufem9BPvVsewovVNuEr5bF1rwrljW24e0S U54aKgVXH7HIjuA9xecYQPggldsiBc8ao6oqYPTK2hR6XP7yCVphQbdGLxXYz5vGdjBV aISw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=rvaOSKdY; 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 r9-20020a17090a560900b00200a2c60f5csi9067933pjf.133.2022.09.12.01.37.59; Mon, 12 Sep 2022 01:38:11 -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=rvaOSKdY; 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 S229872AbiILIag (ORCPT + 99 others); Mon, 12 Sep 2022 04:30:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230186AbiILIaR (ORCPT ); Mon, 12 Sep 2022 04:30:17 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08B7A1A059; Mon, 12 Sep 2022 01:30:00 -0700 (PDT) Message-ID: <7d30b552-a737-9f19-dea8-26978a6601ea@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1662971398; 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=Ko/M01mjxRdaswWjLV+NEVwlojpcTrguLl8c9fDwroI=; b=rvaOSKdYwVlUfJroDJhCBq6ntfqFHL8SbcFkneCZfF5tR0ktlwo6gSd4FZVjVsIHewZxp+ QN2w9xmTZvsx5att7O/aO4DqKQs8zfGBaVMjxDSPl2VdqqI9YnDTYjVNdUngXRGH6hWRMw svEl0BhCzh6qwS9/ng6HF1jpWEL6mOc= Date: Mon, 12 Sep 2022 16:29:51 +0800 MIME-Version: 1.0 Subject: Re: [RFC PATCH 2/7] RDMA/rxe: Convert the triple tasklets to workqueues To: "matsuda-daisuke@fujitsu.com" , 'Bart Van Assche' , "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/12 15:58, matsuda-daisuke@fujitsu.com 写道: > On Mon, Sep 12, 2022 12:09 AM Bart Van Assche wrote: >> 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. > That's an interesting idea, but I am not sure how users specify it. > IIRC, tasklets are generated when rdma link is added, typically by > executing ' rdma link add' command. I don't think we can add > an device specific option to the utility(iproute2/rdma). In my workqueue implementation, I used a sysctl variable to set a value to choose tasklet or workqueue. You can use sysctl or driver parameter to decide to use tasklet or workqueue. And finally the Macros like #if ... #else ... #endif also acts as a method. Zhu Yanjun > >> 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/). > I am also in favor of using workqueues alone not only because of the > disadvantages above but also to avoid complexity. I would like to know > if there is anybody who will bothered by the change especially in terms > of performance. > > Thanks, > Daisuke > >> Thanks, >> >> Bart.