From patchwork Fri Mar 5 09:23:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 393477 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp265640jai; Fri, 5 Mar 2021 01:28:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwt476aiKAM/3o2b5JWPiMH0zXTI1p8Bi6VO+k37E3WqqGPGE2prn3uv+68XxO/LxMKxpXj X-Received: by 2002:a6b:b7d7:: with SMTP id h206mr7600049iof.56.1614936526470; Fri, 05 Mar 2021 01:28:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614936526; cv=none; d=google.com; s=arc-20160816; b=P88vkagfS5NMFTrMoPYDt9ByA8qJCiDBooXguV2BzIokqMErrY7685quvWlmWyJA0u 8OzX5+l24iaC7YmMLJlBGQGB1Ky+uiZBgP7GCpPPfydz/aLSJHVQGff20HyBo1QOgKnO EdEeP4u5k2ki0HBp68zLZdxaKgm9OxJFVN7jN256JCE7rvlpaglUrAefNZxSm32Zjzm/ QksschUEUGBS/L5W6UCTTra2cEtEiNaWKr9jGimjE27MbFO+TDmEuYnPT6rClvy6VFcO vT40WrKt+S+CZkGO08KBBSJ3iVIO3fwv+oNvMJ4BHn+8oykp0bOM27Gz8Y1smBv2AfaA N2FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=FibiVfMaIQ72ptryoYOeLZu6cNQdcbDp88Mmd4bbS28=; b=TUC9rynCaqjhSlN85RqCsBU6CpyuoNoBPbXnnFl5cw1cpCB/5GyVNvMoJ4FBnTMhRo E+dtPgzaTHtKs6rPFJyuKg1zSaz7vlVZGjqXnOhbW+4sdBeIMakCwBvLgoocv8bVm5qx C5CcisunupuJD2kk8xOvFqHZgCnBEk1W/6t/9K4oyan3GrClJcz8kcmJS+Hz1xaR4oHd 3KAWowdgz2CxO6WuxHNhYZl6bxLPVMD3kg6tENJk4KTVp0VTIdKqRjZjzlzDmYrLOlOb xMUys04u2mMpc7Qykla/VFpYwsdkstkatcFlnYFJoZ67OU/U+uf2iMpg/A7exABe3xef 7Btw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="eXSnm/Xy"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m26si1945060jap.40.2021.03.05.01.28.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Mar 2021 01:28:46 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="eXSnm/Xy"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lI6lJ-0005xW-QJ for patch@linaro.org; Fri, 05 Mar 2021 04:28:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lI6gR-00019O-WE for qemu-devel@nongnu.org; Fri, 05 Mar 2021 04:23:44 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:45100) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lI6gO-0004LK-V3 for qemu-devel@nongnu.org; Fri, 05 Mar 2021 04:23:43 -0500 Received: by mail-wr1-x433.google.com with SMTP id e10so1247555wro.12 for ; Fri, 05 Mar 2021 01:23:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FibiVfMaIQ72ptryoYOeLZu6cNQdcbDp88Mmd4bbS28=; b=eXSnm/XywBcs0uSOP2HyC4frWTLLuzMHTIgcevYlB3k/UPsXAm7w8a5aLrVevs7L7t b/84r33VcpAqrnMmPh8ZY7fA3/hyd9t5OAbEgTUIcMgUuLXZ5BL8paXSozfSVBvP3HOE bqki1tNOlsvSzGk7TTj7SZPULtlZm9JeTWU00YRHSvUSLJQqOjvHD5CqgTzmEcn6AQFF 183BFdVwYezloL31DfIXqHRo4ygxhT3V9u0/0BVpvF5wLbWIIarWC1I5fh4uENRgwx1I ruOsfd3gs+ZABsIjsAqVSKcAoezlGYF3pu2R9KBBIBG6XrJBuR879RDjyfHs8B7On3Yc Fznw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FibiVfMaIQ72ptryoYOeLZu6cNQdcbDp88Mmd4bbS28=; b=RA9vmy+sk2+4Zfw6hRfTd8hpbLCBd1PnWNbUtUkjOsVWdEKFtfSJmvCHPwD1OUkAMV FCZUrKGCql/F3Ov66jrJo3AShMyk43uH239tpLj51igbzeRZ9a384cloZzpJ3iePX89H 7fc2EMbvjGrOHHRGjp6Pr/QmIqLq1YAe8OgkdhDJfBSHuMvH5QJ0LeY95SJSwja9QVqP HzinHrH8m0XtaxSJ92kjmRYf8wTE8048dEPblShUCU35AJD2pUTa22Ig2+skyu53ZUp5 WmlTPBdnC7M+veX7E/PeMA54SrI3in4p1rDePXYaIt4oPe27bsEzH7qOy/cffxqqIF81 upwg== X-Gm-Message-State: AOAM533NpvVFzhLuaiQ+aAHqYjP5VIrycUdafrOYrYkD0PyAX2DYbgSS 3P6f3DI+gj5Ldvg/siW2YzaHZw== X-Received: by 2002:a5d:6290:: with SMTP id k16mr8391451wru.264.1614936218728; Fri, 05 Mar 2021 01:23:38 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 36sm3761926wrh.94.2021.03.05.01.23.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 01:23:35 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 976EC1FF93; Fri, 5 Mar 2021 09:23:29 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 7/9] gitlab-ci.yml: Allow custom # of parallel linkers Date: Fri, 5 Mar 2021 09:23:26 +0000 Message-Id: <20210305092328.31792-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210305092328.31792-1-alex.bennee@linaro.org> References: <20210305092328.31792-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , f4bug@amsat.org, Wainer dos Santos Moschetta , Daniele Buono , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniele Buono Define a new variable LD_JOBS, that can be used to select the maximum number of linking jobs to be executed in parallel. If the variable is not defined, maintain the default given by make -j Currently, make parallelism at build time is based on the number of cpus available. This doesn't work well with LTO at linking, because with LTO the linker has to load in memory all the intermediate object files for optimization. The end result is that, if the gitlab runner happens to run two linking processes at the same time, the job will fail with an out-of-memory error, This patch leverages the ability to maintain high parallelism at compile time, but limit the number of linkers executed in parallel. Signed-off-by: Daniele Buono Reviewed-by: Daniel P. Berrangé Message-Id: <20210304030948.9367-2-dbuono@linux.vnet.ibm.com> Signed-off-by: Alex Bennée --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) -- 2.20.1 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c2c5196b8b..1ea944eb91 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,6 +27,10 @@ include: else ../configure --enable-werror $CONFIGURE_ARGS ; fi || { cat config.log meson-logs/meson-log.txt && exit 1; } + - if test -n "$LD_JOBS"; + then + meson configure . -Dbackend_max_links="$LD_JOBS" ; + fi || exit 1; - make -j"$JOBS" - if test -n "$MAKE_CHECK_ARGS"; then