Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp967042iog; Thu, 30 Jun 2022 14:02:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1swvQ28Nj/G+CDRZ89S3VCoUCc7sd8L7mWI3EPV+PVB1MDquy7K9MoceBEbJ8Njzwur50zs X-Received: by 2002:a17:90a:66c1:b0:1ed:4de4:6a57 with SMTP id z1-20020a17090a66c100b001ed4de46a57mr14309888pjl.84.1656622927309; Thu, 30 Jun 2022 14:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656622927; cv=none; d=google.com; s=arc-20160816; b=ZjKipKmBMpr5XwUiR5eI/0DSfKrjBh8pXbhAXRksMsVA+FMUiyPHAVbAg1Rl76mAzB jV2HPjX+G/BYKnRreOQeWn35Uq7M4wOGRH7GKcN55Z/U8oYxEjnsceEGqD9rqLgtwWwg /A1YW1pYORQg++t3JB+rXk1KIkEGqnWAe6ZKuqZhJzHfUy7p96O0jL7ZP2e+sKMswSEz OlKzKvq4WjRZeS7/u6gM/cH6rNJjg1AzFJaQhgs5L7g4VAGJDplVZMndCe3XbwxIhOG7 NO57i74xvVE93MnsfONmxWCTWTyyuQdxhNjvcu+7UcHhJwQqFMrBCHVxrxJwWJ5lGJbk gzsA== 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=opHiS7W0j4JfIKBs5FAWT07swKhjSTZ00pV0v6S58zQ=; b=0eZr03Yx0wY0hrFWBOM6BjsAX7mGf0jRhC39Ww/Nw78RHK7yFNRX34a5rltxym1FBM WBHL6hDw80tImSNTCs3cmGA7iBOCIspSkA3Dskchqo4KSKcHFyf23Evrg400BK4cDXSB gqMYkUiNEkK5rLtyrVb3/ArRo4jdqYBIOcW7MobjvGxHwREHKk2D2Br1xpKKhvwUXO1S kO+ZWFpoQ92d0f93KSCXVt29/dfNsGvHf4sa79xms6bSlCf822lequOak8ZqyF8olwap ogjz7NI7hnwNMr5UPHSYKr1LaGCgfsx9RQpg91P99VSXJ21mZNVgmQ9UgH1OnArQIgHE Dl5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=vdZ3b6pX; 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 pj4-20020a17090b4f4400b001e895fed1e2si5001721pjb.130.2022.06.30.14.01.54; Thu, 30 Jun 2022 14:02:07 -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=vdZ3b6pX; 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 S236119AbiF3UTR (ORCPT + 99 others); Thu, 30 Jun 2022 16:19:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235422AbiF3UTP (ORCPT ); Thu, 30 Jun 2022 16:19:15 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E51C32018A for ; Thu, 30 Jun 2022 13:19:13 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id e132so388927pgc.5 for ; Thu, 30 Jun 2022 13:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=opHiS7W0j4JfIKBs5FAWT07swKhjSTZ00pV0v6S58zQ=; b=vdZ3b6pX+tYCfhtJv9wBy6nGS3J4VGoOyw29++xEt5L+lVni6tK6PkJ4OnsnrR/8l4 OFXG4B5v7VitLeJgHbvKdBwZp7apQOcQkMub2HdZRxKrYc1BIa832Mw5wbeLJZwF7u+W ddOahw9Khk+CQAgdaJFPgAopNmXaDDr2K2CN6QimwHeDF3Z/jmiEF+m1XX/NTw2vk3t6 wTeUfbEWkYTNy1Iw2mN7LJmGh9JJc248oNP97YPizq2DdPEeAAd0c7Bm0+YhjHrLjNGy T7Ij18ep9/paO4Q1gUq+5W7Mnp1YMYTXzVSFDjATjOfbsbgOpB3OuiSkwP8RKyFhcKrO BzMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=opHiS7W0j4JfIKBs5FAWT07swKhjSTZ00pV0v6S58zQ=; b=tIeiH8JdS+z7c2faIV1J9w4Kqdk951rKg++2P+/NqRwar7H9+ni1d816GqhzyQD/9B eTPv4zbV4gk6MAXgw9oa6hHjFBLkiZ5x0DFDEtbYdXY1MZzVzn38SPGzcYnFqJGuiMue e0J99fAiIex30/lkRx8gGNNNJSYEMRP3YiHDPcgrdymaX/np3NhPsmZmQgF8yF8WUU79 YIstkNctlSJwRPiy9oCrnHgaX9exq6pQWMrew81MJGvxnjxcw3QoS0z362+k3m+hWc5H /XGeTxIsAIry1OWINTEH4BiNgle1wEW20pNmTcMGryb+YdOL5CMG4JnnWt29Ulgu+QPe TPIw== X-Gm-Message-State: AJIora9Jn73gUzUA/0YP7IiSPXeMMVJchXIDVPEJboltKKIh4YFz0Xyw 4CyvdmeSOQSWbakSSsCmN0O0GQ== X-Received: by 2002:a05:6a00:234f:b0:525:1f7c:f2bf with SMTP id j15-20020a056a00234f00b005251f7cf2bfmr16361339pfj.14.1656620353395; Thu, 30 Jun 2022 13:19:13 -0700 (PDT) Received: from [192.168.1.100] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id rw7-20020a17090b2c4700b001d954837197sm2464778pjb.22.2022.06.30.13.19.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jun 2022 13:19:12 -0700 (PDT) Message-ID: <9639d0f7-f50d-c3f2-8e68-b208286af68f@kernel.dk> Date: Thu, 30 Jun 2022 14:19:11 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v2 for-next 00/12] io_uring: multishot recv Content-Language: en-US To: Dylan Yudaken , Pavel Begunkov , io-uring@vger.kernel.org Cc: Kernel-team@fb.com, linux-kernel@vger.kernel.org References: <20220630091231.1456789-1-dylany@fb.com> From: Jens Axboe In-Reply-To: <20220630091231.1456789-1-dylany@fb.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 On 6/30/22 3:12 AM, Dylan Yudaken wrote: > This series adds support for multishot recv/recvmsg to io_uring. > > The idea is that generally socket applications will be continually > enqueuing a new recv() when the previous one completes. This can be > improved on by allowing the application to queue a multishot receive, > which will post completions as and when data is available. It uses the > provided buffers feature to receive new data into a pool provided by > the application. > > This is more performant in a few ways: > * Subsequent receives are queued up straight away without requiring the > application to finish a processing loop. > * If there are more data in the socket (sat the provided buffer > size is smaller than the socket buffer) then the data is immediately > returned, improving batching. > * Poll is only armed once and reused, saving CPU cycles > > Running a small network benchmark [1] shows improved QPS of ~6-8% over > a range of loads. I have applied this, changing ->addr2 to ->ioprio for the flags bit as per the io_uring-5.19 branch. Pretty excited about recv multishot. I think it's an elegant model, and it has really nice performance improvements as well! -- Jens Axboe