Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp26345rwb; Mon, 26 Sep 2022 08:52:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6COnBr13rfcf70xWysuBg+PdhqW5CfdyGZ98ht9uyuyjn2YY0xgdD3Eu/PRdkOgyGWg/rH X-Received: by 2002:a05:6a00:b4d:b0:540:cee1:657e with SMTP id p13-20020a056a000b4d00b00540cee1657emr24397244pfo.22.1664207558229; Mon, 26 Sep 2022 08:52:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664207558; cv=none; d=google.com; s=arc-20160816; b=OheucILpwYU07xs6TIS8haXgAjjeG2GpaG7GyNI4rKWsSG2A8I6foGqkmPHJSCJH4z fENbA6Rs5UUKZas5aUa59NmuOPGDI1mxI+8etk/uLLccPD//sZaYybgNUVCuw0+Gtz75 RnYohlGDU9FcDN3fQcmUGPeevwsiTQWCsplYRIGETw6MXV1Vu+P++LOLksMULTPBZKrI smcBTZVWM01d9qeYmM/PYGcTuD1qjMIRUU2mYR8qc8SJQ0x3Q3dzQxz0ul0XfsGhUJ05 GxWZlU+VlTlwKctF+et4FYAylQjV88ueZ16z1rj5RJZmFAejShGTPmJUyzJMEYnTTdBR esrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=trOb7zdgzaJYx7Ddm7fnVqCb5q4PP+7i5q9EzUcUcA8=; b=p+Hs8/Kf+vI5L/GK7ZMLuJ95krDlPztaaqSTc8enPWOJiUGsNFpwpwNKDbxFPrc9m3 v6ljr6iLJdrO5kKoDeXBtf17wfXRdBjH9g8esw7H+l4mfZj8cHOp0U5AWgxIpzPPbOZx AZ0xHe26I+koGOtomxU4haI3L04+3HALOaQblnq5lpGwke60OGP0KTsjWK3W/siRO5DN nqCLUPThnLqX9imQ3RSjhnpxWmu3WsN2jKmaKWnwDDk4rED4W08yUIAbFALFReYtPQ8s CqrM1wbITOfwG/nv/APzPRjqHXj6AFk776MyIaL8VvPUoPE7y2WiyM+S0xyEmyzozbep THsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=GF8H3Zxo; 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=REJECT sp=REJECT dis=NONE) header.from=fb.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f10-20020a056a0022ca00b0053fafd6a529si20463318pfj.24.2022.09.26.08.52.26; Mon, 26 Sep 2022 08:52:38 -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=@fb.com header.s=facebook header.b=GF8H3Zxo; 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=REJECT sp=REJECT dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235452AbiIZPRq (ORCPT + 99 others); Mon, 26 Sep 2022 11:17:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235926AbiIZPQt (ORCPT ); Mon, 26 Sep 2022 11:16:49 -0400 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22F80617E for ; Mon, 26 Sep 2022 07:03:26 -0700 (PDT) Received: from pps.filterd (m0109333.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28Q90n3t022669 for ; Mon, 26 Sep 2022 07:03:26 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=facebook; bh=trOb7zdgzaJYx7Ddm7fnVqCb5q4PP+7i5q9EzUcUcA8=; b=GF8H3Zxofde8cZ5N4edwTAaNHCivCtSRFARz3JHHQpDBKbQrzesXgO8BEbY4DOp/ulME SbQ9HWcPsLBnrgS/iWq6m4sDCv14QF9kNzEDsPNRpKS3zZ4fhNb9l6xAsG4aV6L//v23 HvoCLhq5TFagRG+3+7XBCqriFfEOqplbs14= Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3jswxjucug-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 26 Sep 2022 07:03:25 -0700 Received: from twshared2996.07.ash9.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:82::c) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 26 Sep 2022 07:03:23 -0700 Received: by devbig038.lla2.facebook.com (Postfix, from userid 572232) id 749C56AEBEF3; Mon, 26 Sep 2022 07:03:17 -0700 (PDT) From: Dylan Yudaken To: Jens Axboe , Pavel Begunkov CC: , , , Dylan Yudaken Subject: [PATCH 0/3] io_uring: register single issuer task at creation Date: Mon, 26 Sep 2022 07:03:01 -0700 Message-ID: <20220926140304.1973990-1-dylany@fb.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-ORIG-GUID: aKI93-mhAGY3VneUWBDA6dwX8AUlQCys X-Proofpoint-GUID: aKI93-mhAGY3VneUWBDA6dwX8AUlQCys X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-26_08,2022-09-22_02,2022-06-22_01 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 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. There is another problem in 6.1, with IORING_SETUP_DEFER_TASKRUN. That would like to check the submitter_task from unlocked contexts, which woul= d be racy. If upfront the submitter_task is set at creation time it will simplify the logic there and probably increase performance (though this i= s 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 Dylan Yudaken (3): io_uring: register single issuer task at creation io_uring: simplify __io_uring_add_tctx_node io_uring: remove io_register_submitter io_uring/io_uring.c | 5 ++++- io_uring/tctx.c | 42 ++++++++++++++++++------------------------ io_uring/tctx.h | 6 ++++-- 3 files changed, 26 insertions(+), 27 deletions(-) base-commit: f76349cf41451c5c42a99f18a9163377e4b364ff --=20 2.30.2