Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp604758ioo; Thu, 26 May 2022 10:19:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDMK0YYRHSUiAsT4ownjUoYfNOI4bfDgzcrQ8iZkqKIj17ov6aGJ5Jttu6fWZWRBwMGabs X-Received: by 2002:a17:906:b294:b0:6fe:fdb9:5fb4 with SMTP id q20-20020a170906b29400b006fefdb95fb4mr14781511ejz.179.1653585571310; Thu, 26 May 2022 10:19:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653585571; cv=none; d=google.com; s=arc-20160816; b=0sR5xSB89Igg0jNVbK4eHCXA4w70ftklUqTwtwfolYKmAHX2TRqWOENAn7WLwxyTKi ty25h1X9G88EeGLCK8Vi9t6dhk/4V0A63W3PyWU1VSBrtt1CqIdHHZfIkSRJMtF60bwz +6RUdCXltlXRkxVGCYDT5vxmm0rFxoZRndgjztGSXijToq6mzJsSn+oGGDyjJDlCnt/k 9o0a01Ud4UUtl77PQAHwBARaR+7b12Gwzlfk6QQTk6sEThwUz0mwsbJzXkAKcMqqxhTN hR/OI8ojh+ybDlc22fdKAk67+iGP4EqyXESpczA0ixUpzzdT86TivY+HLEcNmOVtIxv+ R5lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Fy5kErNCSVjulngCO8wTqksqb3m3u5ixS1cOApDJqZ0=; b=YMf6SLyLYrA8fTMpVTzuNXH0Ho6LTOHmIdWKo0P0rMgAVPPoGlyNA1RJl9FSJUPjo7 vM51WVWKCg18y1LWsja8y1XwynhNeZsfm9wo5e5YrNmKmkGXr01TmX1fUt+uKBb1/W/z D+v8ubH7rPUrSo0yrAr3eVASOLTKjxBBcqF3q/fRTV05gftDgJnS6g9FoZVGqfTxqpo2 z1wFEdzVuDA7djSHypAa8YAi5G3RyIZkbR+MWVOcwqpPsjxpLq4QEBolaadoCOtUuk/j CYS3jmY2RMu2r1Sr+/PP9UfQFZgG+MtezFMBnssxugUzOexbHe0Nmf3L2nPVEU9iIE1u Kkrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XxATIGh+; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lj15-20020a170906f9cf00b006fec40443b6si2093446ejb.23.2022.05.26.10.18.54; Thu, 26 May 2022 10:19:31 -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=@linaro.org header.s=google header.b=XxATIGh+; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238145AbiEYJxJ (ORCPT + 99 others); Wed, 25 May 2022 05:53:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235921AbiEYJxH (ORCPT ); Wed, 25 May 2022 05:53:07 -0400 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D237C3389E for ; Wed, 25 May 2022 02:53:05 -0700 (PDT) Received: by mail-yb1-xb31.google.com with SMTP id y141so7914373ybe.13 for ; Wed, 25 May 2022 02:53:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Fy5kErNCSVjulngCO8wTqksqb3m3u5ixS1cOApDJqZ0=; b=XxATIGh+VW2QM99KhmsK6/XhLKdRC3xtVDJd2/U4Do3efc2OMQgo2cku/EQ7l6Nds/ NN2fg8NVzGcgmcq0BJMswTcwUHlyLK3dt0g9aOeAIs9NaprmnaUUY9Ec+qgFs+shAfc3 veGlHHYuPk4YJMnxzDEi6qzxZMQjZpeRdzOJRNN4Gca6RLpYbVmIccrB2c2tFHeZcotY pfLOIjdR8OKBX3XI7FZ+8CLt7ofgEveAZf6gbP0Ypogkm/4FPyiV7hPx888UVD4Z/4bZ bEsnE5yQokNA6NbtNYjaiq6FgGXcDB6bcWeG+F3WwrxwY2UH3pGrnv3bHL11PbZRH2ry HONQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Fy5kErNCSVjulngCO8wTqksqb3m3u5ixS1cOApDJqZ0=; b=xxGttiheWCO5gc6xZgVEa5UlSbxJEghOmJ2x/zd9+nsEtqIlnqsbjIL1ZnPKfNrExk 25/I4oiRju3ZtIRYekQX25J9dfQURTyEMO+X+u6x2ljAIZJwITZAoqnBu6oSNsJ4kf6s JlbRFuUM8RFye9qqi+t5e1CujzVBGZZIXElnIrbzf3N4xucy9o5XDscaaFyUTIdinMEm hRQ5d4v7uE0IxgDLfvH0PwULl7WWAf8K9LLuWD+nh6sMKjgw0ednO6cMthkr6PuM8vmM OlWmsdjiM24/jq+/OaHmNj5W0xeEetuKzd+jFpq8aN4wAXLEupQajrKuhrcOKTYMZ2Ck CNOg== X-Gm-Message-State: AOAM531Xog6b8rEWfBOAWI5YC3/DMC8S7EJOJqqkKZvdVonZBVckIIJw skUK3C6DsXEsNfq4N0ibqsiIqcWOVzIzXbJgOcX4Sg== X-Received: by 2002:a25:d48c:0:b0:64f:5ec6:13b6 with SMTP id m134-20020a25d48c000000b0064f5ec613b6mr23934986ybf.236.1653472384970; Wed, 25 May 2022 02:53:04 -0700 (PDT) MIME-Version: 1.0 References: <20220419211658.11403-1-apais@linux.microsoft.com> <20220419211658.11403-2-apais@linux.microsoft.com> In-Reply-To: From: Vincent Guittot Date: Wed, 25 May 2022 11:52:53 +0200 Message-ID: Subject: Re: [RFC 1/1] drivers/dma/*: replace tasklets with workqueue To: Linus Walleij Cc: Allen Pais , Arnd Bergmann , olivier.dautricourt@orolia.com, sr@denx.de, vkoul@kernel.org, keescook@chromium.org, linux-hardening@vger.kernel.org, ludovic.desroches@microchip.com, tudor.ambarus@microchip.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsaenz@kernel.org, paul@crapouillou.net, Eugeniy.Paltsev@synopsys.com, gustavo.pimentel@synopsys.com, vireshk@kernel.org, andriy.shevchenko@linux.intel.com, leoyang.li@nxp.com, zw@zh-kernel.org, wangzhou1@hisilicon.com, shawnguo@kernel.org, s.hauer@pengutronix.de, sean.wang@mediatek.com, matthias.bgg@gmail.com, afaerber@suse.de, mani@kernel.org, logang@deltatee.com, sanju.mehta@amd.com, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, agross@kernel.org, bjorn.andersson@linaro.org, krzysztof.kozlowski@linaro.org, green.wan@sifive.com, orsonzhai@gmail.com, baolin.wang7@gmail.com, zhang.lyra@gmail.com, patrice.chotard@foss.st.com, wens@csie.org, jernej.skrabec@gmail.com, samuel@sholland.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Wed, 25 May 2022 at 11:24, Linus Walleij wrote: > > On Tue, Apr 19, 2022 at 11:17 PM Allen Pais wrote: > > > The tasklet is an old API which will be deprecated, workqueue API > > cab be used instead of them. > > > > This patch replaces the tasklet usage in drivers/dma/* with a > > simple work. > > > > Github: https://github.com/KSPP/linux/issues/94 > > > > Signed-off-by: Allen Pais > > Paging Vincent Guittot and Arnd Bergmann on the following question > on this patch set: > > - Will replacing tasklets with workque like this negatively impact the > performance on DMA engine bottom halves? workqueue uses cfs thread so they will be scheduled like any other thread. Furthermore, schedule_work uses the default system workqueue which is shared with a lot of other stuff and doesn't parallel work so you can expect some performance impact. If you really want to use workqueue, you should at least create your own workqueue. But you should also have a look at irq_work; An example of usage is kernel/sched/sched_cpufrequtil.c > > For reference: > https://lore.kernel.org/dmaengine/YoI4J8taHehMpjFj@matsya/ > > Yours, > Linus Walleij