From: "Jordan Justen" <jordan.l.justen@intel.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Laszlo Ersek <lersek@redhat.com>,
Rebecca Cran <rebecca@bsdio.com>,
devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH] OvmfPkg: enable multiprocessor builds when using build.sh
Date: Tue, 23 Jul 2019 01:05:25 -0700 [thread overview]
Message-ID: <156386912527.18964.11550708881413954016@jljusten-skl> (raw)
In-Reply-To: <9733a473-7dc0-c8e4-18e5-0a1d0f80f3e0@redhat.com>
On 2019-07-23 00:44:06, Laszlo Ersek wrote:
> On 07/23/19 02:00, Rebecca Cran wrote:
> > On 2019-07-22 17:14, Jordan Justen wrote:
> >>
> >> I was suggesting that if they didn't specify -n as a param to
> >> build.sh, then build.sh should not send -n to the edk2 build command.
> >> The effect would be for the edk2 build command to check
> >> Conf/target.txt. By default, I think target.txt will not set
> >> THREADNUMBER, so "0" would still be the result.
> >>
> >> Yet, it would give them the option to set it in Conf/target.txt.
> >> Today, since we always use the -n param, target.txt is always ignored
> >> for this parameter.
> >
> >
> > On a related topic, I wonder if we should add a "-j" parameter if we
> > build BaseTools for users (e.g. "make -j4 -C BaseTools")? I've found
> > that it can be pretty slow without it: on my system adding -j4 reduces
> > build time from 55 seconds to 15. Going higher doesn't seem to produce
> > much more benefit: -j32 (on a ThreadRipper system) reduces it to 12 seconds.
> >
> >
>
> Passing
>
> -j $(getconf _NPROCESSORS_ONLN)
>
> to "make" (for building BaseTools) makes sense, IMO.
I guess the concern might be that we'll be running a bunch of
make invocations in parallel, each trying to spawn a compilation for
each thread. O(n^2) compilations. :)
In the make man-page for -j: "When make invokes a sub-make, all
instances of make will coordinate to run the specified number of jobs
at a time;", but I'm not sure if that's how `build -n` is implemented.
(With make...)
Since python writes the makefiles, it could be used instead of
getconf, right?
What we need is someone to make the ninja-build backend for BaseTools.
:)
-Jordan
next prev parent reply other threads:[~2019-07-23 8:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 0:58 [PATCH] OvmfPkg: enable multiprocessor builds when using build.sh rebecca
2019-07-22 7:11 ` Jordan Justen
2019-07-22 20:06 ` [edk2-devel] " Laszlo Ersek
2019-07-22 23:14 ` Jordan Justen
2019-07-22 23:52 ` rebecca
2019-07-23 0:00 ` rebecca
2019-07-23 7:44 ` Laszlo Ersek
2019-07-23 8:05 ` Jordan Justen [this message]
2019-07-23 12:05 ` Laszlo Ersek
[not found] <15B394CDDC5FF98D.6157@groups.io>
2019-07-22 0:59 ` rebecca
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-list 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=156386912527.18964.11550708881413954016@jljusten-skl \
--to=devel@edk2.groups.io \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox