Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2012676pxj; Sat, 19 Jun 2021 00:03:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxAghyqWgY+OcULEw97YHxyFvLY0JMkmhP0zrK0L6q992pqEncNzxRDIzIA3lejzzfNMH0 X-Received: by 2002:a02:2a07:: with SMTP id w7mr4021754jaw.96.1624086188400; Sat, 19 Jun 2021 00:03:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624086188; cv=none; d=google.com; s=arc-20160816; b=JJI4DnFoh4jRwrbwBhZe5ayWIBsP0CkpZ07RHZjeDqMIZmRJ15AW6hjrR1nvvtNDQv OLQxtzlMJZZANeC3DoC5KbD+PwCKAUFYpHzL1Qz5pb6cPgXIi+/svHlGQMb+J785nnyT /yCYxFVyUYhkhAAffZJDoyRNQVzrO5kLIg2fbKsb7vr2k5DNhPd8sK6/rPinnfUUlfwS scIyn1HB/uByNZ6Gb1TQshhXCsfkVREjiAVB8wn3BD2oz8kJZG9zXq52ynnmuyHWsGBj ICvT6W2sWOc3DQsIvDHjZkfhiA5aeDopx/D8hiw4TaEll0btdVTT6dEwUo+VLaRpQa++ u8tg== 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:to:from:subject :message-id; bh=aVnpTn+Im8zaWKDQx+51iL1ghmgY/98uQz38PSIRqaE=; b=JGEz5mOMZgHzIacgqoHMrqGgs7NZteNCYVITqw/sWasv1BFL8ACLatjZBbjH+lg6lz frBcCQLQxsHjI6t7zPkWRJ8tJ7utcjNYWpZupQEHZc8Dsjf7C7P6lrEdD41U1PUb+Q9N 9/nn9IB9Rw1oA69nlBpS6ISAKL5XSSISbysTMJ2tt5C0B31pO+O1dFRMEIKQD965X/mY tNyAGVbWmuLMEO4a+lR0/Z+WBwbgHDcCB9YqpeCV/iO7EySdtGB+yfW6WTVkbSGIRcZp 40XWzNPw9P/mresEX8NER9dWEGIQHDJU+6321xlXSz5pd29ZJ+OZNJ8hLacaBkR2YE+n Z45A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m18si11313596ion.52.2021.06.19.00.02.55; Sat, 19 Jun 2021 00:03:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234593AbhFRVkX (ORCPT + 99 others); Fri, 18 Jun 2021 17:40:23 -0400 Received: from cloud48395.mywhc.ca ([173.209.37.211]:54136 "EHLO cloud48395.mywhc.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230399AbhFRVkW (ORCPT ); Fri, 18 Jun 2021 17:40:22 -0400 Received: from modemcable064.203-130-66.mc.videotron.ca ([66.130.203.64]:33082 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 1luMBo-0003I9-9r; Fri, 18 Jun 2021 17:38:12 -0400 Message-ID: <489a3a2ded1daf962b8bfa3c936e20526b975d1a.camel@trillion01.com> Subject: Re: [PATCH] io_uring: reduce latency by reissueing the operation From: Olivier Langlois To: Jens Axboe , Pavel Begunkov , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 18 Jun 2021 17:38:11 -0400 In-Reply-To: References: <60c13bec.1c69fb81.f2c1e.6444SMTPIN_ADDED_MISSING@mx.google.com> Organization: Trillion01 Inc Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.2 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2021-06-16 at 06:48 -0600, Jens Axboe wrote: > On 6/9/21 4:08 PM, Olivier Langlois wrote: > > It is quite frequent that when an operation fails and returns > > EAGAIN, > > the data becomes available between that failure and the call to > > vfs_poll() done by io_arm_poll_handler(). > > > > Detecting the situation and reissuing the operation is much faster > > than going ahead and push the operation to the io-wq. > > I think this is obviously the right thing to do, but I'm not too > crazy > about the 'ret' pointer passed in. We could either add a proper > return > type instead of the bool and use that, or put the poll-or-queue-async > into a helper that then only needs a bool return, and use that return > value for whether to re-issue or not. > > Care to send an updated variant? > No problem! It is going to be pleasure to send an updated version with the requested change! I will take that opportunity to try out my new patch sending setup ;-)