Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3616190pxb; Mon, 21 Feb 2022 01:55:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNHMyasMqeJngMX0MNrzzYH6dZh7x8tYAC/Vb53XHS556T4Gv1aAU4IePgG9/bWibDiTHg X-Received: by 2002:a17:90a:df16:b0:1bc:46ce:636a with SMTP id gp22-20020a17090adf1600b001bc46ce636amr2795649pjb.155.1645437331542; Mon, 21 Feb 2022 01:55:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645437331; cv=none; d=google.com; s=arc-20160816; b=X3Q6TLcs9mMW8MJprZ6ijrahjyAbo183Md+6Bgryd2pkzG02CDPoOmpoFahAhxB6Ii Zgs935EPj4mcIk4uZ8mxoa2C3y4p0tlka8oCLlbUxsLtZ5x/x71rGj7n6OZk7aKuMGxD jTXGb3iLNdzftsgM6cCHHnEJdVT7/41rfl900EV90waPtQx5y9kiXNKjY1WO2I7tEi+w mkpdgVFzKilBOjoXevCws70MLCU7WlB9ymZpWuEXGAwhPRN+/ru07icQXQAKBponSN31 2Ntft6VjbTsRDWIhp6eggytnjTvAGoN3FxJnG45m5DRyfwMLo630GcQqL2wM8nE4pBPm KLNA== 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 :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=2+LTaSuFO+MxrPpZt/Wpj5McPJSg1oEc3fmqSBgAgME=; b=NCnVIVZMCDNKMaf2KYwklHOwja5jwdYYPkEbBFCo6EnDr3jKI32dnYN2DfdL0/cbY+ IzQaTaotBGbticiGJyy8xBH1QQNisrM9jtpWPIDpTW1ho6ZZyzGzM+iyfNyHcaG5KCYE b+f1myMOuBa8tpTuuLoyzp3R9xgr5/98siONmijqR+VWiTudT0F8JYvvgmRMBvtmkuup OeNHSMX6Q5pjKhVhIlMPMIgHkPySfsi6gWtz1WtSH5vBd7DvIzY0dXbccJLkyR7QXcbd xQDZZe5DkjvyQIMjSLHh+ajIE1D8jknlIdkp4OPNVbRvbQQyAhZW67ZAiogKQivhC1lA sv1w== ARC-Authentication-Results: i=1; mx.google.com; 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 123si17050018pgb.239.2022.02.21.01.55.14; Mon, 21 Feb 2022 01:55:31 -0800 (PST) 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; 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 S244521AbiBTShz (ORCPT + 99 others); Sun, 20 Feb 2022 13:37:55 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:40040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230370AbiBTShv (ORCPT ); Sun, 20 Feb 2022 13:37:51 -0500 Received: from cloud48395.mywhc.ca (cloud48395.mywhc.ca [173.209.37.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82F9EB847; Sun, 20 Feb 2022 10:37:29 -0800 (PST) Received: from [45.44.224.220] (port=44660 helo=[192.168.1.179]) by cloud48395.mywhc.ca with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nLr5L-00074M-PE; Sun, 20 Feb 2022 13:37:27 -0500 Message-ID: Subject: Re: [PATCH v1] io_uring: Add support for napi_busy_poll From: Olivier Langlois To: Jens Axboe Cc: Pavel Begunkov , Hao Xu , io-uring , linux-kernel Date: Sun, 20 Feb 2022 13:37:26 -0500 In-Reply-To: References: Organization: Trillion01 Inc Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.42.3 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud48395.mywhc.ca X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - trillion01.com X-Get-Message-Sender-Via: cloud48395.mywhc.ca: authenticated_id: olivier@trillion01.com X-Authenticated-Sender: cloud48395.mywhc.ca: olivier@trillion01.com X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 Sat, 2022-02-19 at 17:22 -0700, Jens Axboe wrote: > > Outside of this, I was hoping to see some performance numbers in the > main patch. Sounds like you have them, can you share? > Yes. It is not much. Only numbers from my application and it is far from being the best benchmark because the result can be influenced by multiple external factors. Beside addressing the race condition remaining inside io_cqring_wait() around napi_list for v2 patch, creating a benchmark program that isolate the performance of the new feature is on my todo list. I would think that creating a simple UDP ping-pong setup and measure RTT with and without busy_polling should be a good enough test. In the meantime, here are the results that I have: Without io_uring busy poll: reaction time to an update: 17159usec reaction time to an update: 19068usec reaction time to an update: 23055usec reaction time to an update: 16511usec reaction time to an update: 17604usec With io_uring busy poll: reaction time to an update: 15782usec reaction time to an update: 15337usec reaction time to an update: 15379usec reaction time to an update: 15275usec reaction time to an update: 15107usec Concerning my latency issue with busy polling, I have found this that might help me: https://lwn.net/ml/netdev/20201002222514.1159492-1-weiwan@google.com/