Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3510527pxb; Sun, 20 Feb 2022 22:42:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxiyWUeJhqj4Hb05MSJise08gL4HSHfaB0wB0+YdHI56/Z8/0RHNDsPFrIWvq/nThkOna2+ X-Received: by 2002:a17:906:fac4:b0:6ce:ea4:a153 with SMTP id lu4-20020a170906fac400b006ce0ea4a153mr14317857ejb.411.1645425767173; Sun, 20 Feb 2022 22:42:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645425767; cv=none; d=google.com; s=arc-20160816; b=OrwDfnotCP9D1LQx5ONdH7C2GQULXu4uuTtXeaOVHfhgHfE8G54cULpXK16NHEy0pM OF8FGpkMKsrQSdvMqZB1ggl3fpWTu9PnoNa7DMsuC0hfzK8++CLy45JaM+HK0CG43stY sUjJFwaHOprpOQN26HN15E91Qi/UvTPq/NdwDHdkYtiaccSmNOeFoZPc4Xofj+owGuOC hUwA6XJ2Srr82ayEDgXBPiKjWKLDt2rXkKyCeI2+LxXC8xeYax5BPL1ExgZYJkwGExWf qffVCXGASLsXfTGuBj6IlQ37z2FANT6jLSoPEnfyBB5Buybn0WzbFTNHhisf63CHda/a K4Ag== 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:subject:user-agent:mime-version:date:message-id; bh=3ZtZrDCdeSxleQfIWiFl84jMDVEQBCwg2LmTEZcrp74=; b=XeSh2jHv3RfW9QUyP8olJcYJetehyLzpodXygUgRG+bPS/V4J32jDrDslU/mnXzIRM 2d6rtLXDm20Pxi9NPuYSXp4aHpKjoHk4pblJOWmx2GHQJ8vu/2gSvUow6xAqCOYglQfq X5RBgI9r9Lcd73etyEGvt+6U7F3o44BmxxXvZpOj1cJ48oQir8BkBvwH+nLg3m68S1hJ fhLFVo4bjyGSPNbHIcPg4hMaJFsqiSySRoEVAwF3pBY7PMqAyaQ5bLkQfyngy996Zl1N MaNEEC9aB46UCeI/rLp95it1FZ6UFkCJQjfx5lTCZBlPnDYC73uXbXALWRUMWjOWCNAs YwkA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14si4127880ejr.253.2022.02.20.22.42.24; Sun, 20 Feb 2022 22:42:47 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344512AbiBUFZ6 (ORCPT + 99 others); Mon, 21 Feb 2022 00:25:58 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344500AbiBUFZ4 (ORCPT ); Mon, 21 Feb 2022 00:25:56 -0500 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3C0313CD5; Sun, 20 Feb 2022 21:25:33 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R981e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=haoxu@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0V5.86ZF_1645421130; Received: from 30.225.24.181(mailfrom:haoxu@linux.alibaba.com fp:SMTPD_---0V5.86ZF_1645421130) by smtp.aliyun-inc.com(127.0.0.1); Mon, 21 Feb 2022 13:25:31 +0800 Message-ID: <96ad477e-138b-b588-3017-8b60dd9443f1@linux.alibaba.com> Date: Mon, 21 Feb 2022 13:25:30 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH v1] io_uring: Add support for napi_busy_poll To: Olivier Langlois , Jens Axboe Cc: Pavel Begunkov , io-uring , linux-kernel References: From: Hao Xu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 在 2022/2/21 上午2:37, Olivier Langlois 写道: > 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 An echo-server may be a good choice. > 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/