Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1206555ybh; Sun, 19 Jul 2020 11:50:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3gbmZXxNPc5pjbErcL11Zevmo12x8h38WXDav8o/gQvQsgFQglYh4JATEJiVNTdrLg3Vx X-Received: by 2002:a17:906:284e:: with SMTP id s14mr17881849ejc.498.1595184635953; Sun, 19 Jul 2020 11:50:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595184635; cv=none; d=google.com; s=arc-20160816; b=Gvgaj27LnD6ATW/ijIGN1N/hMKKpTbQyqjiiYRQyiVULdr3+Ea/htQqnLtQE7uiiS6 z1aR6hsVNSOlHAemOSJqYN6KjwdIZjeaK7X/LVlQ4+I2l1d9pbcvbGF6lL1UmnMf78EP ElKqCqurxhirehbnDd5LJlG7opxpZSi4un7X5Z7c0vjV6CONflLO2vWJhM0iI29Jfait 0k3q+ph+Z6NunfsFvguFBWmwA1U+CLiIsi8ThK6jS6ssk+Iag1OIvIS22qyG6uF2btrI n1TItKXx9FOoWyIKTwFHGKZTMo3Bv4yJ7Pvs2ip+KQSQx7+X5XisD4SE2KS5iQbdh5WY kc7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=yTlqUATRnE0s63HzxpBA+rXzM19bio3RIJ19h/IAN0w=; b=VRBJMY1IgObIj0wqQZa4bKOtZFc8bxuJC4YF2tQ8jzr7fd8Xb9g/Ny58ndkEGYb0du /VRXWe9wTGLNB0cQvXSFtRaKV5IbcEureA6L0zsOCJf/kqf3i7vBtUW4bW7vRdbF5yp/ NNsP/vCotvnFHeoE0Gr/ZQjW99sV0XSqMLQDcBH2FZdT7dgUNGCjyCs5jFWf8As1g4ny 61cd2L3Y6zNQGmT/JveYcHBtQ3T6zcu+vqF1dNjAgxnRyQg5wvXJQigC6Lyyp7Xo5/qJ Su1T+3bpOpglKsLZPSs3i9CVRpfAlg7bDDI687AeljgqDRK24VwWD57b3H8v916koVju VnCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=guGUAbui; 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 bt23si8982367edb.545.2020.07.19.11.50.11; Sun, 19 Jul 2020 11:50:35 -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=guGUAbui; 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 S1726127AbgGSSuC (ORCPT + 99 others); Sun, 19 Jul 2020 14:50:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726049AbgGSSuB (ORCPT ); Sun, 19 Jul 2020 14:50:01 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2775C0619D4 for ; Sun, 19 Jul 2020 11:50:01 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id k71so9054351pje.0 for ; Sun, 19 Jul 2020 11:50:01 -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=yTlqUATRnE0s63HzxpBA+rXzM19bio3RIJ19h/IAN0w=; b=guGUAbuiJXvkEbB26UjVB2UNjunVMknOn2H2tmq32Z86fZ6tx1x4i9tVqN3W7peDSD HRTBz9aTtXNWDZPEd6tQiLr0736NPOw31lxFDmtqSJC31wL4kv7EdbSIIxIURjO/9cwZ hKTT/4E8el1X4zx4ZE0o/0NKJMq88dy3aGY+O/6lN0OahAYYfmlmjceKPcZnMzTzq3er R1BHfbnxZozgsjgZXVAfVr2rnE/vjWtIdNO2u8YDRlPNGaUUj1BhKeR6cz5+fAlJN41d 41AYp9lllvSfpSd1Iv5BrxHY8xNYf2u6X8ZiOQGbbXvPormD/+n6IBJj7kuGpk8/qwTY 7o0w== 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=yTlqUATRnE0s63HzxpBA+rXzM19bio3RIJ19h/IAN0w=; b=bhBJQ5BC6IRe80NugMZE4J2XaX4AVt+ft0VOe6XqKg5djvRmnfJj/bNqkVwGp2mhV0 xnDJISeDcgGNqmdOAbV2m+YfanliUsv4srooNdYaumbDVljTH7bjhApvYacZ+aI6mGDm zX50Vl0LdZbJWpTrX36VJnq3/pEIUlLa1Bu7En40z5chYYgTPfwr35vg5upWkPc+gDu/ Ca0XrjHprjEwbfKr3XJyHPF5gm9cVA1Ns3TDpD6LodFLIVhnhl51Z2+P0jk6oQInMzTC 7r6YplWR++8KKfQiAkL0Xb5IZvng5Y6HgSHgMNXVEdWhya0UTzyzyTdg4zuckp3uO2dT qPTA== X-Gm-Message-State: AOAM532ySlF4pg+57UWNsN3YRTWnCgoA2rSDTLLf0r1SFHrlhPxlCuMq LnPAvyzxn1CMk4CtWHivTkppOGA7ny+ffQ== X-Received: by 2002:a17:902:2:: with SMTP id 2mr15507403pla.288.1595184600757; Sun, 19 Jul 2020 11:50:00 -0700 (PDT) Received: from [192.168.1.182] ([66.219.217.173]) by smtp.gmail.com with ESMTPSA id z11sm14109568pfk.46.2020.07.19.11.49.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Jul 2020 11:49:59 -0700 (PDT) Subject: Re: [PATCH 0/2] task_put batching To: Pavel Begunkov , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org References: From: Jens Axboe Message-ID: Date: Sun, 19 Jul 2020 12:49:57 -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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/19/20 5:15 AM, Pavel Begunkov wrote: > On 18/07/2020 17:37, Jens Axboe wrote: >> On 7/18/20 2:32 AM, Pavel Begunkov wrote: >>> For my a bit exaggerated test case perf continues to show high CPU >>> cosumption by io_dismantle(), and so calling it io_iopoll_complete(). >>> Even though the patch doesn't yield throughput increase for my setup, >>> probably because the effect is hidden behind polling, but it definitely >>> improves relative percentage. And the difference should only grow with >>> increasing number of CPUs. Another reason to have this is that atomics >>> may affect other parallel tasks (e.g. which doesn't use io_uring) >>> >>> before: >>> io_iopoll_complete: 5.29% >>> io_dismantle_req: 2.16% >>> >>> after: >>> io_iopoll_complete: 3.39% >>> io_dismantle_req: 0.465% >> >> Still not seeing a win here, but it's clean and it _should_ work. For > > Well, if this thing is useful, it'd be hard to quantify, because active > polling would hide it. I think, it'd need to apply a lot of isolated It should be very visible in my setup, as we're CPU limited, not device limited. Hence it makes it very easy to show CPU gains, as they directly translate into improved performance. > pressure on cache synchronisation (e.g. spam with barriers), or try to > create and measure an atomic heavy task pinned to another core. Don't > worth the effort IMHO. > ` > Just out of curiosity, let me ask how do you test it? > - is it a VM? > - how many cores and threads do you use? > - how many io_uring instances you have? Per thread? > - Is it all goes to a single NVMe SSD? It's not a VM, it's a normal box. I'm using just one CPU, one thread, and just one NVMe device. That's my goto test for seeing if we reclaimed some CPU cycles. -- Jens Axboe