From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: fam@euphon.net, berrange@redhat.com, stefanb@linux.vnet.ibm.com,
richard.henderson@linaro.org, f4bug@amsat.org,
Ed Vielmetti <ed@packet.com>,
cota@braap.org, stefanha@redhat.com, marcandre.lureau@redhat.com,
pbonzini@redhat.com, aurelien@aurel32.net
Subject: Re: [PATCH v2 11/12] .travis.yml: probe for number of available processors
Date: Fri, 31 Jan 2020 16:51:52 +0100 [thread overview]
Message-ID: <ea3262e1-43b0-8382-a5b9-aff969e7145a@redhat.com> (raw)
In-Reply-To: <20200130113223.31046-12-alex.bennee@linaro.org>
(Cc'ing Ed Vielmetti)
On 1/30/20 12:32 PM, Alex Bennée wrote:
> The arm64 hardware was especially hit by only building on 3 of the 32
> available cores. Introduce a JOBS environment variable which we use
> for all parallel builds. We still run the main checks single threaded
> though so to make it easier to spot hangs.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> .travis.yml | 20 +++++++++++---------
> 1 file changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/.travis.yml b/.travis.yml
> index 1b92f40eab..a600f508b0 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -85,6 +85,8 @@ git:
> # Common first phase for all steps
> before_install:
> - if command -v ccache ; then ccache --zero-stats ; fi
> + - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
Yeah finally!
Note, on the Cavium ThunderX CN88XX provided by Packet, Ed Vielmetti
once suggested to use the --load-average make option due to Amdahl's
law, and I noticed a minor speedup using -j96 -l47.5 (-l48 already
starts to decrease).
On https://docs.travis-ci.com/user/reference/overview/#linux I read
"LXD compliant OS images for arm64 are run in Packet."
Per
https://travis-ci.community/t/what-machine-s-does-travis-use-for-arm64/5579/2
the CPU seems to be a Ampere eMAG Skylark:
https://en.wikichip.org/wiki/apm/microarchitectures/skylark
Probably the eMAG 8180:
https://en.wikichip.org/wiki/ampere_computing/emag/8180
I don't know what would be the best limit for this CPU.
Back to this patch, it indeed reduced the build time by 2+, so:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> + - echo "=== Using ${JOBS} simultaneous jobs ==="
>
> # Configure step - may be overridden
> before_script:
> @@ -93,7 +95,7 @@ before_script:
>
> # Main build & test - rarely overridden - controlled by TEST_CMD
> script:
> - - BUILD_RC=0 && make -j3 || BUILD_RC=$?
> + - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
> - if [ "$BUILD_RC" -eq 0 ] ; then travis_retry ${TEST_CMD} ; else $(exit $BUILD_RC); fi
> after_script:
> - if command -v ccache ; then ccache --show-stats ; fi
> @@ -125,7 +127,7 @@ matrix:
> env:
> - BASE_CONFIG="--enable-tools"
> - CONFIG="--disable-user --disable-system"
> - - TEST_CMD="make check-unit check-softfloat -j3"
> + - TEST_CMD="make check-unit check-softfloat -j${JOBS}"
> - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
>
>
> @@ -160,13 +162,13 @@ matrix:
> - name: "check-unit coroutine=ucontext"
> env:
> - CONFIG="--with-coroutine=ucontext --disable-tcg"
> - - TEST_CMD="make check-unit -j3 V=1"
> + - TEST_CMD="make check-unit -j${JOBS} V=1"
>
>
> - name: "check-unit coroutine=sigaltstack"
> env:
> - CONFIG="--with-coroutine=sigaltstack --disable-tcg"
> - - TEST_CMD="make check-unit -j3 V=1"
> + - TEST_CMD="make check-unit -j${JOBS} V=1"
>
>
> # Check we can build docs and tools (out of tree)
> @@ -366,7 +368,7 @@ matrix:
> - name: "GCC check-tcg (user)"
> env:
> - CONFIG="--disable-system --enable-debug-tcg"
> - - TEST_CMD="make -j3 check-tcg V=1"
> + - TEST_CMD="make -j${JOBS} check-tcg V=1"
> - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
>
>
> @@ -375,7 +377,7 @@ matrix:
> - name: "GCC plugins check-tcg (user)"
> env:
> - CONFIG="--disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user"
> - - TEST_CMD="make -j3 check-tcg V=1"
> + - TEST_CMD="make -j${JOBS} check-tcg V=1"
> - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
>
>
> @@ -383,7 +385,7 @@ matrix:
> - name: "GCC check-tcg (some-softmmu)"
> env:
> - CONFIG="--enable-debug-tcg --target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
> - - TEST_CMD="make -j3 check-tcg V=1"
> + - TEST_CMD="make -j${JOBS} check-tcg V=1"
> - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
>
>
> @@ -391,7 +393,7 @@ matrix:
> - name: "GCC plugins check-tcg (some-softmmu)"
> env:
> - CONFIG="--enable-plugins --enable-debug-tcg --target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
> - - TEST_CMD="make -j3 check-tcg V=1"
> + - TEST_CMD="make -j${JOBS} check-tcg V=1"
> - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
>
> - name: "[aarch64] GCC check-tcg"
> @@ -500,7 +502,7 @@ matrix:
> - BUILD_DIR="release/build/dir" SRC_DIR="../../.."
> - BASE_CONFIG="--prefix=$PWD/dist"
> - CONFIG="--target-list=x86_64-softmmu,aarch64-softmmu,armeb-linux-user,ppc-linux-user"
> - - TEST_CMD="make install -j3"
> + - TEST_CMD="make install -j${JOBS}"
> - QEMU_VERSION="${TRAVIS_TAG:1}"
> - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
> script:
>
next prev parent reply other threads:[~2020-01-31 16:36 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-30 11:32 [PATCH v2 00/12] testing/next (with build fixes!) Alex Bennée
2020-01-30 11:32 ` [PATCH v2 01/12] tests/docker: move most cross compilers to buster base Alex Bennée
2020-01-31 15:22 ` Philippe Mathieu-Daudé
2020-01-30 11:32 ` [PATCH v2 02/12] tests/docker: better handle symlinked libs Alex Bennée
2020-01-31 15:58 ` Philippe Mathieu-Daudé
2020-01-31 16:48 ` Alex Bennée
2020-01-30 11:32 ` [PATCH v2 03/12] gitlab-ci: Refresh the list of iotests Alex Bennée
2020-01-30 11:32 ` [PATCH v2 04/12] travis.yml: Install genisoimage package Alex Bennée
2020-01-30 19:04 ` Thomas Huth
2020-01-31 15:56 ` Philippe Mathieu-Daudé
2020-01-30 11:32 ` [PATCH v2 05/12] .shippable: --disable-docs for cross-compile tests Alex Bennée
2020-01-31 15:23 ` Philippe Mathieu-Daudé
2020-01-30 11:32 ` [PATCH v2 06/12] hw/hppa/Kconfig: LASI chipset requires PARALLEL port Alex Bennée
2020-01-30 11:32 ` [PATCH v2 07/12] .travis.yml: Drop superfluous use of --python=python3 parameter Alex Bennée
2020-01-30 11:32 ` [PATCH v2 08/12] .travis.yml: Add description to each job Alex Bennée
2020-01-30 19:06 ` Thomas Huth
2020-01-31 15:24 ` Philippe Mathieu-Daudé
2020-01-31 15:37 ` Thomas Huth
2020-01-30 11:32 ` [PATCH v2 09/12] .travis.yml: build documents under bionic Alex Bennée
2020-01-31 15:27 ` Philippe Mathieu-Daudé
2020-01-30 11:32 ` [PATCH v2 10/12] .travis.yml: move cache flushing to early common phase Alex Bennée
2020-01-31 15:31 ` Philippe Mathieu-Daudé
2020-01-30 11:32 ` [PATCH v2 11/12] .travis.yml: probe for number of available processors Alex Bennée
2020-01-30 19:09 ` Thomas Huth
2020-01-31 15:51 ` Philippe Mathieu-Daudé [this message]
2020-02-01 22:13 ` Ed Vielmetti
2020-01-30 11:32 ` [PATCH v2 12/12] .travis.yml: limit the arm64 target list Alex Bennée
2020-01-30 19:43 ` Thomas Huth
2020-01-31 15:55 ` Philippe Mathieu-Daudé
2020-01-31 16:14 ` Philippe Mathieu-Daudé
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=ea3262e1-43b0-8382-a5b9-aff969e7145a@redhat.com \
--to=philmd@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=aurelien@aurel32.net \
--cc=berrange@redhat.com \
--cc=cota@braap.org \
--cc=ed@packet.com \
--cc=f4bug@amsat.org \
--cc=fam@euphon.net \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanb@linux.vnet.ibm.com \
--cc=stefanha@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).