Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp571786pxm; Wed, 2 Mar 2022 23:27:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJysnE9CGAVpntEC5hrJglSCgjR450qdULNpmKRgHuOybvwvSMU6s1Z/TPs5EojDAK0Kolcj X-Received: by 2002:a17:906:4ccd:b0:6b7:75ca:3eac with SMTP id q13-20020a1709064ccd00b006b775ca3eacmr25701186ejt.167.1646292467029; Wed, 02 Mar 2022 23:27:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646292467; cv=none; d=google.com; s=arc-20160816; b=Gv6HGZpcYv6I9T/06NKdbpnTIW5z3d+xfV33aiuaMB+XzRlPjuywcl6KoAY4LFLVY1 0NGi0RMalFelXrlOO9cO7wQZFU44ihlx1+Rntbvygwp+mt3EZUvz0PNALfXdhHoskwZj ZUhwBhO79eD2Q8zJjVK73UTCMeKRXUaPGXhefJ9PAE++AHPTJwAL6UKy4dGboiC7IzI4 /u9AdXERuPwsYCII8Zb6CpsyYUTfQ1OhO50uHNU3bzZ+/hDFB9VYPPCK5yg7cOw+sC9i AjdwhV05XWooc/OL8dq7aBSnUVpmToRcCeBfFIBvVFaBvWI0vi2un7JF/G0+xrGmGXRd TbYg== 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; bh=OhQgb1L7MIhaOI6AmdJq6sAXgPdrpqzOTuMw6xcDoKs=; b=KbS+mCcU4nmFcLn/uLpkPQBKSfqiNBSNYW/kBiSYor/1FUNJ6mE80khxhjFj2RpuSI yIdZ60yDRR+1CY6IOyA7fVpFeyiiD3Sa7cw9QnnjyRFjx0EpwXJHC2H2TtgCy4rQbPOj GNjXfqZSWkPtc+2ot+R5mpnlC0kH/Peji1EXCzjNaag2jRJYiDzeoHTByjXxpT1627yH pVyOA+umsoUl5GcwkPZLEDWAoBn7lNJupiC/33pWywJOO23Bar4xOnjXDAzYp0mPL67h ODthREw+zz9r423h4vBG//bKg1sEldyTjL2pM5iaVHA0tVLOhMa0MVAmM0lTgByu/72P JJbA== 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 c14-20020a056402120e00b00415a1580bd7si692908edw.71.2022.03.02.23.27.24; Wed, 02 Mar 2022 23:27: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 S229564AbiCCHNB (ORCPT + 99 others); Thu, 3 Mar 2022 02:13:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230115AbiCCHMx (ORCPT ); Thu, 3 Mar 2022 02:12:53 -0500 Received: from out30-43.freemail.mail.aliyun.com (out30-43.freemail.mail.aliyun.com [115.124.30.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A499C16AA72; Wed, 2 Mar 2022 23:12:07 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=haoxu@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0V66BpVC_1646291523; Received: from 30.226.12.33(mailfrom:haoxu@linux.alibaba.com fp:SMTPD_---0V66BpVC_1646291523) by smtp.aliyun-inc.com(127.0.0.1); Thu, 03 Mar 2022 15:12:04 +0800 Message-ID: <40be865d-17c0-80a3-e434-73317c5bff70@linux.alibaba.com> Date: Thu, 3 Mar 2022 15:12:01 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v4 2/2] io_uring: Add support for napi_busy_poll Content-Language: en-US To: Olivier Langlois , Jens Axboe , Pavel Begunkov Cc: io-uring , linux-kernel References: <29bad95d-06f8-ea7c-29fe-81e52823c90a@linux.alibaba.com> <4f01857ca757ab4f0995420e6b1a6e3668a40da5.camel@trillion01.com> <4af380e8-796b-2dd6-4ebc-e40e7fa51ce1@linux.alibaba.com> <81a915d3-cf5f-a884-4649-704a5cf26835@linux.alibaba.com> 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, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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 On 3/3/22 06:03, Olivier Langlois wrote: > On Wed, 2022-03-02 at 14:38 +0800, Hao Xu wrote: >>>> >>>> If that is what you suggest, what would this info do for the >>>> caller? >>>> >>>> IMHO, it wouldn't help in any way... >>> Hmm, I'm not sure, you're probably right based on that ENOMEM here >>> shouldn't >>> >>> fail the arm poll, but we wanna do it, we can do something like >>> what >>> we do for >>                              ^---but if we wanna do it > My position is that being able to perform busy poll is a nice to have > feature if the necessary resources are available. If not the request > will still be handled correctly so nothing special should be done in > case of mem alloc problem. Exactly what I meant. > > but fair enough, lets wait for Jens and Pavel to chime him if they > would like to see something to be done here. Agree. > > Beside that, all I need to know is if napi_list needs to be protected > in __io_sq_thread with regards to io worket threads to start working on > a v5. Sorry for the delay, was stuck in other things. We definitely need lock in this case too. It should be several lines code, super appreciate if you could add it. Thanks, Hao > > I'll look into this question too...