From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CDEEC433F5 for ; Mon, 18 Oct 2021 13:17:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8200560724 for ; Mon, 18 Oct 2021 13:17:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231854AbhJRNTQ (ORCPT ); Mon, 18 Oct 2021 09:19:16 -0400 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:35706 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231847AbhJRNTQ (ORCPT ); Mon, 18 Oct 2021 09:19:16 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=haoxu@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0UsfIkJQ_1634563023; Received: from B-25KNML85-0107.local(mailfrom:haoxu@linux.alibaba.com fp:SMTPD_---0UsfIkJQ_1634563023) by smtp.aliyun-inc.com(127.0.0.1); Mon, 18 Oct 2021 21:17:03 +0800 Subject: Re: [PATCH v2 0/2] async hybrid for pollable requests To: Pavel Begunkov , Jens Axboe Cc: io-uring@vger.kernel.org, Joseph Qi References: <20211018112923.16874-1-haoxu@linux.alibaba.com> <7a0d4182-6e08-99b9-ffca-483023f7a15f@gmail.com> From: Hao Xu Message-ID: Date: Mon, 18 Oct 2021 21:17:03 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <7a0d4182-6e08-99b9-ffca-483023f7a15f@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org 在 2021/10/18 下午8:31, Pavel Begunkov 写道: > On 10/18/21 11:29, Hao Xu wrote: >> 1/2 is a prep patch. 2/2 is the main one. >> The good thing: see commit message. >> the side effect: for normal io-worker path, added two if and two local >> variables. for FORCE_ASYNC path, added three if and several dereferences >> >> I think it is fine since the io-worker path is not the fast path, and >> the benefit of this patchset is worth it. > > We don't care about overhead in iowq, but would be better to get rid > of the in_worker in io_read(). See comments to 1/2. > > Btw, you told that it performs better comparing to normal > IOSQE_ASYNC. I'm confused, didn't we agree that it can be > merged into IOSQE_ASYNC without extra flags? I see what you are saying, forgot to remove the flag stuff..will be more careful. > >> >> Btw, we need to tweak the io-cancel.c a bit, not a big problem. >> liburing tests will come later. >> >> v1-->v2: >>   - split logic of force_nonblock >>   - tweak added code in io_wq_submit_work to reduce overhead >>   from Pavel's commments. >> >> Hao Xu (2): >>    io_uring: split logic of force_nonblock >>    io_uring: implement async hybrid mode for pollable requests >> >>   fs/io_uring.c                 | 85 ++++++++++++++++++++++++++--------- >>   include/uapi/linux/io_uring.h |  4 +- >>   2 files changed, 66 insertions(+), 23 deletions(-) >> >