Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp468495pxj; Wed, 16 Jun 2021 06:39:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5LVg2XxXXrau+1YHfwBD5h9AbUeGgnnNbiRZ00WXMg+bHPwjckZE59ZnvLJUZsFbAh2PK X-Received: by 2002:a02:6382:: with SMTP id j124mr4389572jac.72.1623850783029; Wed, 16 Jun 2021 06:39:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623850783; cv=none; d=google.com; s=arc-20160816; b=H/vcZmd1oppEX2sT5rSYUAlBkB3T0SZko8K7gJZpSVqb2egicBMQfvslps498y/iiv 6e7sF5aUd2XYm8isophkYYrejnPrs6soKJOqYjhIza9FTesvIwfcwQhneG3xiiVcUlgN Ov/xRIXi0BIHEXEBHyAw9sZrxrZmY4u5JlBwVvn0vHjbS4+CZk+Bo3aJFCRVzfvMAl+j DyqQHX95JNUC3dMjHWL92YzUtn4yifJH7vbhMhlnmE1EQeqk4uJ8ebOmf894MnHPjb7z 6/mNou+iYq+5Ap35IfHTfYVF2kcecKtnqSwyfx6iqi673T2w3UKHtJFNzWTWNmmk6Kh6 yZsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=6HpoBlmpJ233t0Q6yG7oBMakkTPLqj6mc2Rb8mKRkQY=; b=QmkJ0PSfa9rWUI8NJjsWjZ3V24WMfV8cWU2v+kMI/LsPsMCym25A4oC/S92S/mXzBW XRB1re33WmF+Lq0BFl3JRG9wGSmVwF7db/abndzs2xObn+7VYzgYNUe6NS4zJX+8h44r 5MrlAdOqDH335KF9oIRVVC4zQIYaDhHqFhyIOYdoNv7pzgdJ66ZzsuDRupfFZIGz19eo Z2NtoJc0xsaXT7OYRUieIItjVba96eCq1GAOERFkfgzm+pJ393/JSKlcWzsxk4X+hMLv R4TMr5fjsw6jx+yarFU8CQc0W9H7KFpG7yz0cC0D0w1UQrq5szO6wGgWSh6Xd/JV1nWI aqsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=IdkaaxAZ; 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 f7si2084678ilu.143.2021.06.16.06.39.30; Wed, 16 Jun 2021 06:39:43 -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; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=IdkaaxAZ; 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 S232874AbhFPMvA (ORCPT + 99 others); Wed, 16 Jun 2021 08:51:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232732AbhFPMvA (ORCPT ); Wed, 16 Jun 2021 08:51:00 -0400 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 526B5C06175F for ; Wed, 16 Jun 2021 05:48:54 -0700 (PDT) Received: by mail-ot1-x335.google.com with SMTP id j11-20020a9d738b0000b02903ea3c02ded8so2334432otk.5 for ; Wed, 16 Jun 2021 05:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=6HpoBlmpJ233t0Q6yG7oBMakkTPLqj6mc2Rb8mKRkQY=; b=IdkaaxAZAcwnbtDiscGZuZ1UEpjaIF4Vp5j2wQvhfhbCMOBIfkAKzT276rxgbwK3Az iXxK/r3JsPCsOy/rAR83WEIMzIfJcBKF6f66ez3MtL6djsOl+UQf8EXeoYBgO3b9dVuJ Sdody38CRrLU5TDxE2WlM3RF8tha3MSQAvk/8Ki7WTSqjp3jICePqn+0bCbYoVmWGhx0 t+vSPLwNnao8U0XiopWhONbo0xoJbbhzIQ5ljwb2cHmeAGOK/x9oOuLzvGqjx+7adScL HVQwP2PZq1UnAEwME3in4ViXbCJw30vIuZq+MKe8vSBNmbxHHyYXrqwj4n2udvnb8y0j azSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6HpoBlmpJ233t0Q6yG7oBMakkTPLqj6mc2Rb8mKRkQY=; b=Om/lzdFCi5EXMWFj6eXt+jMUZuedGtGlXgXMm5/FUrZNrxy29i+ZboltwZVPOtMJZO DY7hJ8hDT3Vr0yZ0ORRYEnwiTqahEaRqqsPGvIa9D6qKtHVgxW0f7nQmrbkWMpq+SQ7P iOUEJp0CBeuFRSRWZbiyZf7ElRLje9t4eCsCa88p4PsNWnETtgoFXrzcwPtVpsl3gyPT L8sMs4c5SJiHxmuq1TEvlQZdVD8PAzT6XuOn9oxPFeDzv4pK5zSTSrep04/+t26zHJ2R 3oILtRV+enshDqPWUWYg9CJ0Wrukt0LWeA1intq8a247gA7AUw7ZSkW181iF/ZSTdtTX gFjA== X-Gm-Message-State: AOAM533v1XCM1kgqcIliliR6yok4taS5UsPukrpGvdBBQw3PBoTohRNQ GhC8bwBhkL6Ij7UYrE6pMUvkEcegSuGcVA== X-Received: by 2002:a9d:6d8c:: with SMTP id x12mr3920896otp.121.1623847733413; Wed, 16 Jun 2021 05:48:53 -0700 (PDT) Received: from [192.168.1.134] ([198.8.77.61]) by smtp.gmail.com with ESMTPSA id u10sm498207otj.75.2021.06.16.05.48.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Jun 2021 05:48:53 -0700 (PDT) Subject: Re: [PATCH] io_uring: reduce latency by reissueing the operation To: Olivier Langlois , Pavel Begunkov , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org References: <60c13bec.1c69fb81.f2c1e.6444SMTPIN_ADDED_MISSING@mx.google.com> From: Jens Axboe Message-ID: Date: Wed, 16 Jun 2021 06:48:52 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <60c13bec.1c69fb81.f2c1e.6444SMTPIN_ADDED_MISSING@mx.google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- Jens Axboe