Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5052488rwb; Tue, 6 Sep 2022 17:54:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR5/ER436OiPkB1o96FrHJW49Ji6G6DKSkFAo3Ra0+QBIUannhy56vQ8aQlcw0W0HxSNygQ4 X-Received: by 2002:a17:907:3ea3:b0:741:66c0:7f68 with SMTP id hs35-20020a1709073ea300b0074166c07f68mr667791ejc.31.1662512033868; Tue, 06 Sep 2022 17:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662512033; cv=none; d=google.com; s=arc-20160816; b=Yw5AAaej6DPyRPJRWdfSwf0COw3K+j34w9mU6CuEC6y+M3zUjTPe4fC2JqBGAT1aew ihgLcuRfm9r1zrVFEyPtAWk7CqzMnTKOGYtXBQK0oO+CRNGD5/3gxkz6nA0MpGs6vCZb zVPmYsnGWdTKS1newnq+v1IEhQZLS2tq7d7FeazQYn/iPVCmLo1LGE2t0W/1Ynf+9rCW 16Sx56cbud4o8mOdSr4PoF4UrakRiRdZmcT9uHEdaYQBTOe1m1OqV/NGdP4U5UUDLx3h K8nJJ9KObWZXO99l/3juaBXQMqx9sgmQHDap3pn1KpgJqHtUyKA0H/Fxda5C8WDAb5/h AQRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IWbBY2Vma6qLbzeS+8YTI+hqv9KeinttN4dUddHRaGg=; b=pfDQCW387iNvavBsc4rlpHWVMDEsOznGdfcrDlewYClZsdtk+OKOcYdtTSKbtF6DsV cd7X2PnAzHIDPbcEVmomUFXccGtdXnzyWwTsGRELcvEFFh2LDeUP0h3GgTITnE9bRm3V 1ycCK2E2phrSal8f7EGTy01imc/MUwFEe7DPKlpijavq/8wloNuNbvZDdthfzHpXn2gT gcPctA0kXfDG4XX6iCcBH0nyJcF5tH0qjY0+pXONnrby0kDu6kawwPndW5PyDyKyuZL8 3YGS1pxtPFD1yAuY5eEJur4MrH3q6j0U0rqRBt8gssl7t4Pv5or203qDDcyhBDjgdlfe yhgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Eb3Xrj/w"; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd32-20020a1709076e2000b00718d1cddac1si10478234ejc.833.2022.09.06.17.53.26; Tue, 06 Sep 2022 17:53:53 -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=@redhat.com header.s=mimecast20190719 header.b="Eb3Xrj/w"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229543AbiIGApH (ORCPT + 99 others); Tue, 6 Sep 2022 20:45:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiIGApF (ORCPT ); Tue, 6 Sep 2022 20:45:05 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E46DF72852 for ; Tue, 6 Sep 2022 17:45:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662511502; 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: in-reply-to:in-reply-to:references:references; bh=IWbBY2Vma6qLbzeS+8YTI+hqv9KeinttN4dUddHRaGg=; b=Eb3Xrj/wl8QhsxrDcwR9pmt/WGMwrKVLt9c/k81kcxJoHE5zNKazLXparzCPnYVnXUyU3c 7FhUakguw9iR2IIz/L+FhUYJMonv6eUaxQh2GhD7AXOhyRcplHkxb8DPig61GTHHz2LJug MJHgvn6BuYxiCSThtbe1ReIz6BcdtDA= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-319-RL7OylbtP1OI7Tm1awSYIg-1; Tue, 06 Sep 2022 20:45:01 -0400 X-MC-Unique: RL7OylbtP1OI7Tm1awSYIg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3E9723C0F361; Wed, 7 Sep 2022 00:45:01 +0000 (UTC) Received: from T590 (ovpn-8-17.pek2.redhat.com [10.72.8.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D32CC2026D4C; Wed, 7 Sep 2022 00:44:57 +0000 (UTC) Date: Wed, 7 Sep 2022 08:44:51 +0800 From: Ming Lei To: Jens Axboe Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH] kernel: export task_work_add Message-ID: References: <20220829040013.549212-1-ming.lei@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220829040013.549212-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,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 On Mon, Aug 29, 2022 at 12:00:13PM +0800, Ming Lei wrote: > Firstly task_work_add() is used in several drivers. In ublk driver's > usage, request batching submission can only be applied with task_work_add, > and usually get better IOPS. > > Secondly from this API's definition, the added work is always run in > the task context, and when task is exiting, either the work is rejected > to be added, or drained in do_exit(). In this way, not see obvious > disadvantage or potential issue by exporting it for module's usage. > > So export it, then ublk driver can get simplified, meantime with better > performance. > > Cc: Christoph Hellwig > Signed-off-by: Ming Lei Hello Guys, Gentle ping... Thanks, Ming