Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp35299ybh; Mon, 20 Jul 2020 09:41:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjE9XFEbLEu6XkuT6AIF/0xuCWa0x0b8pTxJUrsD9LG59iFUTmbROIn0tZKhu/UTXSu89o X-Received: by 2002:a17:906:5595:: with SMTP id y21mr22159044ejp.61.1595263277758; Mon, 20 Jul 2020 09:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595263277; cv=none; d=google.com; s=arc-20160816; b=hZ4XSgWC4YPcFFX396+Km/duVhMPWR1JqLQENAway+CJO6Qeq5+KyMN7Am7hdUimdE AWI1j0RQZZPfwcBikypnVOe5KsuPa6WC1WTvVC+uxY+ZPfb4rhCuNwH4/ro9XzGuUhsE kzP1X8TiAj/BY7FvyKd560EaLijj7mvNH635YDYN2KQZxE6HX8cPWmMzpQK72ZDzwDlc BDgriy1Oq7/EpOKwxHUKR4ojDZ2kjq4573eU4uMRh8WRKsOY5GhNM2gb2F5xO9mop3VW NtECOnanpaQcl+mrvIIgXW+IFiNe67DbHpbCnxP+aRwUb9vK0aQbxPBgwsmcGKeTzogQ JgDQ== 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=D/CA+/3/bTndVqHDVfOkxSHtDGUPSGt5x3VVKQfqZbg=; b=XXY0DIdaqieFFkXkRe+A1z4LEgZyQZX+Z7LpFEbud/uBFnAiAE4LwVniFX7D03VgQe jHsmNnwY8P94k65AXS3Ihv/JVag1JGQSP6c+jfeyFfaWKqeYY47mKOs2fjY6L00Mwlmd lg+H1VSJPabZAHIQAlZwE24WbSjPlviGdwQLzAHIjpQl/95h0V7cf2bdC/zk8aAxcrQm Xdg1B06jbD+cvCAnYHHvLJmVRc57SsoqXYeMR1TXrE1enUFExjSoMOJEH+9woaqlac9h x/kDCwz1EZh0Ob4yUmeHfq5t3vx4feCtQY2ZV+zRst/B97hXV78K0xQvqYym3j03PC6a LmVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=WGiBVFDx; 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 qh22si10863825ejb.553.2020.07.20.09.40.54; Mon, 20 Jul 2020 09:41:17 -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=WGiBVFDx; 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 S1731569AbgGTQjg (ORCPT + 99 others); Mon, 20 Jul 2020 12:39:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730967AbgGTPtF (ORCPT ); Mon, 20 Jul 2020 11:49:05 -0400 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6C69C0619D2 for ; Mon, 20 Jul 2020 08:49:04 -0700 (PDT) Received: by mail-il1-x142.google.com with SMTP id k6so13693163ili.6 for ; Mon, 20 Jul 2020 08:49:04 -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=D/CA+/3/bTndVqHDVfOkxSHtDGUPSGt5x3VVKQfqZbg=; b=WGiBVFDxkDK9ZFg0IrwsBU9TGmD+ri9d6HGdShiF1Ll+N1iHXGFQmIfLUSjif3Cmp+ AVeUuZqUIux5ykvvGzRtLUa1DylQFhVVOKR7da7PHAgVzIKkJcHa7BONkoYjb/tCizfw 1j4ywtzIffpQMa6dfjP3vGDCMKE5fn+PykRLQgbP431T/6VxhaOEmuCQyGkis6crNs5T HmAg41n3TmKIBU5R3qZ0YW8M+/EMEkE+3TpK2YDfQrsc5H8hJC9ES3ygxd+39EonR6Cx BDO3PHM1BrFlmkKI/BU0weuKzZ9PE3fTQTc4HoMAoDdTfYmVdfAxVSUf4Jd14SZHpD+K LVhg== 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=D/CA+/3/bTndVqHDVfOkxSHtDGUPSGt5x3VVKQfqZbg=; b=JUdYs82RPV9wDXuq8mV6bljW1Hh3RBPyKCK1wWeX9acSmo77+4sCgi41Vdechx300z QVIbLIgTkzVvUg7wjq9nKK5GVlxVWet9to/AbedAS+UtGRo4V1Wt4CXrUU1I6mGUtvtI WMSRry0IKMNQr5PAddKG2Af0ZpQtDzzKTu2hNwjOV2g+BjWWr00QVofpgMT9dTi6Y+Df OkDyEw6IWiOKCssNMdeAo2lbvMUCpYhSVNKRDVhuEhDWYsu4MIqjSne+aPxHDMs5zAyJ 3+P4hRXiaBXlS3lRl1BfUutpB25YCaTEZkUo82wHkrH0IyvxsEkkgQMwfE8lRwqiTVtw 3eoQ== X-Gm-Message-State: AOAM53200WaVo1NdLavzSEYzauWohz57LgtSS8Z0rqUmmu4rRdtl5VBf 9HyfsIK6A2UoGSGMStgGBvsmfyt2imhX5A== X-Received: by 2002:a05:6e02:605:: with SMTP id t5mr23516270ils.116.1595260144075; Mon, 20 Jul 2020 08:49:04 -0700 (PDT) Received: from [192.168.1.58] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id z78sm9474809ilk.72.2020.07.20.08.49.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jul 2020 08:49:03 -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: Mon, 20 Jul 2020 09:49:02 -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/20/20 9:22 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 >> some reason I end up getting the offset in task ref put growing the >> fput_many(). Which doesn't (on the surface) make a lot of sense, but >> may just mean that we have some weird side effects. > > It grows because the patch is garbage, the second condition is always false. > See the diff. Could you please drop both patches? Hah, indeed. With this on top, it looks like it should in terms of performance and profiles. I can just fold this into the existing one, if you'd like. -- Jens Axboe