Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1379665ybv; Thu, 13 Feb 2020 22:10:27 -0800 (PST) X-Google-Smtp-Source: APXvYqxwux/lpoEPeQYYX9bLRPx177Yx8Xc97umOZwgOZjNZwrjoE/OLVsVPjziXtHO21c2KhKZT X-Received: by 2002:a9d:4b05:: with SMTP id q5mr954394otf.57.1581660627242; Thu, 13 Feb 2020 22:10:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581660627; cv=none; d=google.com; s=arc-20160816; b=kmjgAV6MSeCI7ZW+2n0bCRgSsn9nZ0uNKXwG8VUATCpnx8E3hQZKvthTpFzQBK/KIY 71Kkv95XmOhdDb2etclZ3wy/OtkFM/NsycxyPETA82SCsqq1Kr+Yn6yGTgnvEYnNcldQ uJD5YRy9njIZkdP1GaTpeBagJzfCFFsqpz+s007AvMwEEONSae0SCASSmFLv/xaX8ggh FBwmwNE3BZZUOMyGMTDwk0KlYlVSVuP/pV0Fd2FAh+jMmIOyW9aIUW6Jgeo9T7l0dCJc 6kGVpvuI8PIKVl3zbjgZ60Fl6FZN45s8YSyuGIBxmb2eC1ia18cOU0TUJHI0bB0EdGm6 bVYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=+7RMPJEVPRKXZ2B6WyzK4QVQKPrVaUbNgsUZmKadjk8=; b=pn9UcCNaaS6WIcTONAYt9GZVDMb7ccPzjTnaogGpSut9GyluuOya5Brbb7dTDZF3Y8 QUw0ZFL1/ypFTvbU1a+VYn4cHX6n2ydFN+RH9oxe4KPmz/4mNl2zNh4u06+OC1AVgRYi vHKpQx4ZGgb/UJD87gVkcAvgM5o+hyAZi5J2cgyq6I5rTeSmzQcjy4d7yB7hTj4dYU1z ktJNDtVN/0oKQgaUISKcoa5+lfNZ8/7IJQPOyS3Oefog4G1d2ogVxJv8ymuO4338tpFU yTEDSVPjJQV6RRJwS/eoLwnD+XdFvnAQEkij5hEGU70mw9LfJvttQnzHMkyaNbsLwZ8w 1RbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v25si2346639otq.93.2020.02.13.22.10.14; Thu, 13 Feb 2020 22:10:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726635AbgBNGIk (ORCPT + 99 others); Fri, 14 Feb 2020 01:08:40 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:50843 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbgBNGIk (ORCPT ); Fri, 14 Feb 2020 01:08:40 -0500 Received: from localhost (50-39-173-182.bvtn.or.frontiernet.net [50.39.173.182]) (Authenticated sender: josh@joshtriplett.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 64818100003; Fri, 14 Feb 2020 06:08:36 +0000 (UTC) Date: Thu, 13 Feb 2020 22:08:34 -0800 From: Josh Triplett To: Linus Torvalds Cc: Linux Kernel Mailing List Subject: Re: Applying pipe fix this merge window? Message-ID: <20200213225952.GA5902@localhost> References: <20200208083604.GA86051@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 12, 2020 at 12:03:26PM -0800, Linus Torvalds wrote: > And I realized that I find it surprising that it makes your build > times noticeably better. > > Yes, I have that silly example program to show the issue in the commit > message, and yes, the exclusive directed write->read wakeups should > most definitely improve by that commit. > > But the make jobserver code ends up using "poll()/pselect()" and > non-blocking reads, because of how it handles the child death signals. > > Which means that none of the nice exclusive directed write->read > wakeups should even trigger in the first place, because the readers > never block, and he poll/pselect code doesn't use exclusive wakeups > (because it can't - it doesn't actually consume the data). > > So I was looking at it, and going "it should actually not help GNU > jobserver at all" in the fixed jobserver case. I dug into this a little further yesterday and today: - With hindsight, I realized that the performance improvements I observed for GNU make didn't measure the pipe fix in isolation; they measured 5.4 versus ~5.5-rc4 plus the pipe fix, which would include all the other pipe work in 5.5 and potentially other optimizations. *That* showed substantial performance improvements in GNU make, on the order of a couple of seconds in a 30-60 second kernel build. ("5.5-rc4 plus pipe fix" is what I hammered on for a month on various systems.) - Measuring the pipe fix patch in isolation (0bf999f9c5e74c7ecf9dafb527146601e5c848b9, with and without the pipe fix reverted, with nothing else changed), GNU make performance indeed doesn't show any difference. - Other things that use the GNU make jobserver (with pipe fds in blocking mode) benefit much more heavily, in wall-clock time and in total CPU time. I saw jobs that involved just a minute or two of wall-clock time, where the total CPU time went down by *minutes*. Hope that helps, Josh Triplett