From: Josh Triplett <josh@joshtriplett.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Applying pipe fix this merge window?
Date: Thu, 13 Feb 2020 22:08:34 -0800 [thread overview]
Message-ID: <20200213225952.GA5902@localhost> (raw)
In-Reply-To: <CAHk-=whdiabQ0dqVDJ0_5dfur7f2D5oESCjv34f4svrK3RJj=w@mail.gmail.com>
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
prev parent reply other threads:[~2020-02-14 6:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-08 8:36 Applying pipe fix this merge window? Josh Triplett
2020-02-08 18:45 ` Linus Torvalds
2020-02-08 21:53 ` Linus Torvalds
2020-02-08 22:04 ` Josh Triplett
2020-02-12 20:03 ` Linus Torvalds
2020-02-14 6:08 ` Josh Triplett [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200213225952.GA5902@localhost \
--to=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.