Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3596237pxj; Tue, 1 Jun 2021 08:48:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3wkf8tTZfH4AAP83fhKgo7nTAICUD1OuFdnLl/hXhxCxVVuULRjm+4nEjeAdojm+nnXoE X-Received: by 2002:aa7:c844:: with SMTP id g4mr28803781edt.257.1622562507541; Tue, 01 Jun 2021 08:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622562507; cv=none; d=google.com; s=arc-20160816; b=lfOAGo6xGIr1f6Y3Rm4Qy7p82dTRt9zS0eMXuaYW34ZB2yDm8oufX/5xtNIuLy3O4z o7TvY53cUzaOBxHz5HZpyBMhk9DDlSwfGTai5RnCRmJYQaSaJHiW0Mulj4qCfNYGL81x ZrTDG4tUMdSZM0jN+NUBj82HXjaYCMWie/5uHJFUobLUVsJuCY+nX5sbykgpG30Q81cQ odduHwd0a2WpDajPxDtPCMrXPA+GLQSke20pg/Qxd4EVkyU5rmfYsDJ5cA7h0ESl9gdA upfQ2vdyUDCo1QYddQCwhh54eM3mow/TMhyogQeJWPPZ527D9qG+9mT8HT0OC5Y3l5NP A/Ig== 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 :cc:to:subject:dkim-signature; bh=1brf0TNGK9dwPAZExXLrTnxWg27vyStpEfD6aI5ecy8=; b=wNJhIZJ4dTbbL4LOuCjxyNcaC8H0Qm6Gme7imWEtF84Yne+UcujKnnjIjit7SGGP6v tFvxEGTkOpWXm/+SdesxCE/kWi2yUgmBxeqQSjdZmz03zmEAZeULirQ0EmG3GHwsUmjk nilba3LfP8/xDzj9+LzyvdzgzSrUyzSby3XTvATb9NF2lb6coSEv4MzMbbVUAHe/Ttj1 nNFN9GiC5pJwghZoB2MANipL6yPJ4P8zFkE35zCjIZKKXaQsqZ5iXzQQOrIvkH+davm6 ldGm/gu1UgxoWMGRDiNOlGFyAqaaC+EnYD+GYVH5lGCAMw6hnlBYqN8k1DekD9Zyol64 dWAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b="nS/BVQ3e"; 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 r15si13464479eju.627.2021.06.01.08.48.04; Tue, 01 Jun 2021 08:48:27 -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="nS/BVQ3e"; 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 S234488AbhFAPrI (ORCPT + 99 others); Tue, 1 Jun 2021 11:47:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234497AbhFAPrG (ORCPT ); Tue, 1 Jun 2021 11:47:06 -0400 Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A939DC061760 for ; Tue, 1 Jun 2021 08:45:24 -0700 (PDT) Received: by mail-io1-xd31.google.com with SMTP id d9so9711476ioo.2 for ; Tue, 01 Jun 2021 08:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=1brf0TNGK9dwPAZExXLrTnxWg27vyStpEfD6aI5ecy8=; b=nS/BVQ3ejh6rcsl5a0NIHHQxjse1R5LazqmOG+3eXyGRU+q/nl+xUDLNctRJgLvegh BC69FqoULkVis6CuHWC8Yuf2oGoVT8PXeqfYUK3DcvBTbVj4y+jpM5EssUrK+PJDJDV4 xKzVGCrz5lkEWTqXevoTnH0ANphqdIVteYcRR/4uBBZOIN1+/LKDuTMjrFa4QYySIBse ycN+Ymd+JhjHrQ2hJ/YkyDXHDeC2OUkvKQLM10HVpZiSGAfq+08rTs1o2Ry95UsblpRy IwqAF56foyLEcb8TseIQPIcMxZk63ZH88PxnVo9JWg8au6E0dkTp61LlxJxKC9mvYe2+ 9kew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1brf0TNGK9dwPAZExXLrTnxWg27vyStpEfD6aI5ecy8=; b=rVB+wiX87Mf+KDgE4aYIuB3WznfxmdETtDF1x2ZuDtBmi1kc1UyPo4+ej5b2FgI0t0 oj4zbazJx/+m4Y9hbU8cV8HnclDqeqhQ7ZQGnOj4i1+MI+lesm90uMIkR4x5SwubK9vN EUGkFgc9DM1f8VQLnxj2EgVjKjxZV6gdWTgIIEvEY2PxBrM1oTnfEtk0PiuTYlKq3CSs 071KA4DMAk6l8KLOBcPlq+3ugDGWpvcJiGGwkRAnKPcWNz57F9QmfRpl9wsak5txFUkF +8TBSi8ulqpFfNWBL/VKJa13uemeSBmzU3Yd7FEWqJkteiS8wlr13abCbMBIq5DQBsLY n8JQ== X-Gm-Message-State: AOAM533QWpOVcEjTbiT4ifrJZU700ZRCZZxQYEuaqD2fvSc1fYHCTABN TmVRF28xBr0KVTwtL67dPG8OalCO98TFf4jZ X-Received: by 2002:a6b:b58d:: with SMTP id e135mr2809576iof.46.1622562323604; Tue, 01 Jun 2021 08:45:23 -0700 (PDT) Received: from [192.168.1.30] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id x5sm9526336iom.43.2021.06.01.08.45.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Jun 2021 08:45:23 -0700 (PDT) Subject: Re: [RFC 4/4] io_uring: implement futex wait To: Pavel Begunkov , io-uring@vger.kernel.org Cc: Andres Freund , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , linux-kernel@vger.kernel.org References: From: Jens Axboe Message-ID: Date: Tue, 1 Jun 2021 09:45:22 -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: 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/1/21 8:58 AM, Pavel Begunkov wrote: > Add futex wait requests, those always go through io-wq for simplicity. Not a huge fan of that, I think this should tap into the waitqueue instead and just rely on the wakeup callback to trigger the event. That would be a lot more efficient than punting to io-wq, both in terms of latency on trigger, but also for efficiency if the app is waiting on a lot of futexes. -- Jens Axboe