From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: jordan.l.justen@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by groups.io with SMTP; Mon, 22 Jul 2019 00:11:14 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2019 00:11:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,294,1559545200"; d="scan'208";a="344334817" Received: from dannylex-mobl.amr.corp.intel.com (HELO localhost) ([10.254.50.219]) by orsmga005.jf.intel.com with ESMTP; 22 Jul 2019 00:11:12 -0700 MIME-Version: 1.0 In-Reply-To: <20190722005816.96146-1-rebecca@bsdio.com> References: <20190722005816.96146-1-rebecca@bsdio.com> From: "Jordan Justen" Subject: Re: [PATCH] OvmfPkg: enable multiprocessor builds when using build.sh Cc: Rebecca Cran To: Ard Biesheuvel , Laszlo Ersek , Rebecca Cran , devel@edk2.groups.io Message-ID: <156377947230.31344.9139528030621143554@jljusten-skl> User-Agent: alot/0.8 Date: Mon, 22 Jul 2019 00:11:12 -0700 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Maybe a commit message tweak would be: OvmfPkg/build.sh: enable multithreaded build by default On 2019-07-21 17:58:16, Rebecca Cran wrote: > When building both BaseTools and OvmfPkg, enable multiprocessor builds, > using up to the number of cores available in the system. This can > drastically reduce build times. > For example, on a modern ThreadRipper system the > time required to build decreases from 3 minutes to 1 minute. >=20 > Signed-off-by: Rebecca Cran > --- > OvmfPkg/build.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh > index 4fcbdd2bc9..5d3a672bd2 100755 > --- a/OvmfPkg/build.sh > +++ b/OvmfPkg/build.sh > @@ -40,7 +40,7 @@ ARCH_X64=3Dno > BUILDTARGET=3DDEBUG > BUILD_OPTIONS=3D > PLATFORMFILE=3D > -THREADNUMBER=3D1 > +THREADNUMBER=3D$(getconf _NPROCESSORS_ONLN) Based on OvmfPkg/build.sh --help, I think initializing THREADNUMBER to 0 might have the same effect, but not depend on getconf. Does that work? I'm not sure why I defaulted this to single threaded build way back in 578630802e. It looks like if we tweaked things more, and omitted adding the -n parameter to the build command by default, then it would use the Conf/target.txt value, which by default appears to also be 0, so this could accomplish the same thing, but also let a user set it in target.txt. -Jordan > LAST_ARG=3D > RUN_QEMU=3Dno > ENABLE_FLASH=3Dno > --=20 > 2.22.0 >=20