Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp268438rwb; Mon, 26 Sep 2022 12:05:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7HK+s7/s6/rlm6r08XR1jlrMblluTuHsnFsO2Pl3ToOyBsbmntPyxhTjY+RXiGWNXytnI9 X-Received: by 2002:a17:902:cec8:b0:178:6c66:cf16 with SMTP id d8-20020a170902cec800b001786c66cf16mr23958216plg.121.1664219116733; Mon, 26 Sep 2022 12:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664219116; cv=none; d=google.com; s=arc-20160816; b=q66naYv0mWW5xq+iMba4hsu+pNbRUYWJXHLNMqkjsfNkPkbLBcHl4IbTCnhAOP6xeG zmrw0gPQ1R/UDPQom7R74kcSb1tVrTruEeReiQjs9pk+J87IeEW/CoRFueDV85Lpdp2p 6j23Ejb7Mjl/N3hIazsSrveShMAotFIsw/EIEAuyeZm5MMahp8i2ppXalRK7F3nNA5g7 mmzCHEOZLMCFFuGfdya5Gm3Bs6hNUMHT6LsFxnGNDSUU56cI5syv35TapyxMly6HFk+M 9I/ZuJH/An6VbRIi6XOwY4j78d4LyX3BAZt5VsqiC7hviqliGtEDzRKYoL/lUgpvKvai SgXQ== 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:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=3UDB+4Tbwce9pR58c0ZN5geJK+uyQ//9lahofej6FOQ=; b=nrRrGS1RGULUCPq7Rfp97e0LTafjzp8Ig5Hpu+kXVp5hh2EI8TIVk4PmSLIM8zzp5b QJd1NP3jtoVAnmmTv9DHQX6ZRSy/5pDWSKbFXCkxdmi2w9uhpF3rdzS+OmRsp5NlTzXe LE8sCXLeJIJl7XIbWINMV3o+83dW4+c/Zyi4ttaRxZF5oT5Bps6KOzfnZdXd+A7Lqlnq lSzL77ef+J8CIsJkK8W/gDTYl4pK/3g1HloZubZR/jnmpOfpmUo6bOobnO/UEKkwsCu0 UPsYqCqnzwOrEQDgSz07IsmBCEEH83rv2frmx0PjU4sHz7DvV+cj2rNG+ywi9hCdauHy pdbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=joF09ODO; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n184-20020a6327c1000000b00434f9ba0b5fsi19725939pgn.472.2022.09.26.12.04.50; Mon, 26 Sep 2022 12:05:16 -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=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=joF09ODO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231218AbiIZRzD (ORCPT + 99 others); Mon, 26 Sep 2022 13:55:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231220AbiIZRy1 (ORCPT ); Mon, 26 Sep 2022 13:54:27 -0400 Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6764DF91 for ; Mon, 26 Sep 2022 10:30:09 -0700 (PDT) Received: by mail-io1-xd35.google.com with SMTP id p3so5785916iof.13 for ; Mon, 26 Sep 2022 10:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=3UDB+4Tbwce9pR58c0ZN5geJK+uyQ//9lahofej6FOQ=; b=joF09ODOj2sn8V5OOw855GR4U83EMwZ+3twmgamSgjjg1BP6TBmzO7jNoFSOOCuNny mKF7J2mhJyi+LzstukLDBD7ji7ZDJsj+9BEpzm9eRMGqbdujbVUkrilHP3/s+pfjui7g 66MRX6OBRQ9d5VOsTHeWfV/O7ItW75IsrudWxPPaAzLP8IkzQLzLCBYMtRoZx5A2OLgW DAeWpXX0biRU+b9RnlKAVEHrIwn1u30an5E1Ytnj2Ef8TexD9n2y5Ix8fQuxxNuWku9Q xg14DCuMx20sKfExJvEYEV4SpP5O4/jHmp1nCR0QB/GY3YML4xL5eiW/PNdyDKGxm1sD 6g2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=3UDB+4Tbwce9pR58c0ZN5geJK+uyQ//9lahofej6FOQ=; b=cRvmURjgblE522mDsGRjYNAtKeaNo7XuJCKEI8+eoiqfDbKJyS9icQQo1qUZexrUaW rgmxTXGMGEsRKJV2Z3LCVQZqzXYrTporZZwBxyFNGoFc8RsgZ4d6PedXOnKLpNlPMNvW hyvDaSkTMNbpeG7+HMYWUeWE9B9ZFg52kopj4vIKxwpyOIHwyz1e8Eummk58jeOOicAJ BdZkW/+IYwBS7hZfd3oV9Cd4n4b9dgCFK7+ttIyR3aoOFclRmCkMTLssEW2Xd3LRZGF8 4NKbkx4GFxjkR/vOS1inY6fxP7V+7wKOU6oqYedw9iSPcSktUeoa0HwVc9+CshUNdUr+ ISHw== X-Gm-Message-State: ACrzQf0j8C54XBVzsPjSGaY3KGyrLHUXS0kAY3yJtmmlV8MFAcShmq2w WThC7P80rkB3t+59pPtVXfV6Cs9L1AaGDg== X-Received: by 2002:a02:900a:0:b0:35a:84e4:39aa with SMTP id w10-20020a02900a000000b0035a84e439aamr12597620jaf.191.1664213408836; Mon, 26 Sep 2022 10:30:08 -0700 (PDT) Received: from [192.168.1.94] ([207.135.234.126]) by smtp.gmail.com with ESMTPSA id a11-20020a927f0b000000b002f5abff23aasm6611384ild.46.2022.09.26.10.30.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Sep 2022 10:30:08 -0700 (PDT) Message-ID: <2098a505-3668-30cb-e3b6-2111a703b27e@kernel.dk> Date: Mon, 26 Sep 2022 11:30:07 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v2 0/3] io_uring: register single issuer task at creation Content-Language: en-US To: Dylan Yudaken , Pavel Begunkov Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com References: <20220926170927.3309091-1-dylany@fb.com> From: Jens Axboe In-Reply-To: <20220926170927.3309091-1-dylany@fb.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 9/26/22 11:09 AM, Dylan Yudaken wrote: > Registering the single issuer task from the first submit adds unnecesary > complications to the API as well as the implementation. Where simply > registering it at creation should not impose any barriers to getting the > same performance wins. The only catch is users that might want to move the > ring after creation but before submission. For these users allow them to > create the ring with IORING_SETUP_R_DISABLED and then enable it on the > submission task. > > There is another problem in 6.1, with IORING_SETUP_DEFER_TASKRUN. That > would like to check the submitter_task from unlocked contexts, which would > be racy. If upfront the submitter_task is set at creation time it will > simplify the logic there and probably increase performance (though this is > unmeasured). > > Patch 1 registers the task at creation of the io_uring, this works > standalone in case you want to only merge this part for 6.0 > > Patch 2/3 cleans up the code from the old style Thanks, I like 1/3 a lot better now. Will provide applications with an easy path to use SINGLE_ISSUER, even if they currently setup the ring from a different thread/task than they end up using it from. I've updated the 6.0 and 6.1 repos to reflect this. -- Jens Axboe