From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uHPQEqFI6WNODQEAbAwnHQ (envelope-from ) for ; Sun, 12 Feb 2023 21:14:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id +D7kEaFI6WM7UAEAG6o9tA (envelope-from ) for ; Sun, 12 Feb 2023 21:14:25 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F177910F06 for ; Sun, 12 Feb 2023 21:14:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRIjd-0004ej-6q; Sun, 12 Feb 2023 15:14:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRIjb-0004eZ-4F for guix-patches@gnu.org; Sun, 12 Feb 2023 15:14:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRIja-0003W7-P8 for guix-patches@gnu.org; Sun, 12 Feb 2023 15:14:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pRIja-0003Ze-CE for guix-patches@gnu.org; Sun, 12 Feb 2023 15:14:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61461] [PATCH core-updates] gnu: jemalloc: Build with THP support on aarch64. Resent-From: Roman Scherer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Feb 2023 20:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61461 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61461@debbugs.gnu.org X-Debbugs-Original-To: Guix Patches Received: via spool by submit@debbugs.gnu.org id=B.167623282413704 (code B ref -1); Sun, 12 Feb 2023 20:14:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Feb 2023 20:13:44 +0000 Received: from localhost ([127.0.0.1]:46855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRIjI-0003Yy-Cq for submit@debbugs.gnu.org; Sun, 12 Feb 2023 15:13:44 -0500 Received: from lists.gnu.org ([209.51.188.17]:51884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRIjF-0003Yn-Rz for submit@debbugs.gnu.org; Sun, 12 Feb 2023 15:13:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRIjF-0004co-Jz for guix-patches@gnu.org; Sun, 12 Feb 2023 15:13:41 -0500 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRIjD-0003R3-F4 for guix-patches@gnu.org; Sun, 12 Feb 2023 15:13:41 -0500 Received: by mail-ed1-x52d.google.com with SMTP id w3so3427481edc.2 for ; Sun, 12 Feb 2023 12:13:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burningswell-com.20210112.gappssmtp.com; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=UiQTRWquSJGKfu+1OF7vkd+0zRTj/Gaw6ElR6hhgdZY=; b=Yt6yZNtbB3JbMzPmSBGP5yUyEZpls+9IJDd3GZAN373vjs+cZ1Z3a4CGcFoh/KvpS5 Eb0ckp8dEaBFeRzPGXZvbtKVKCyL9wJjx4XYir+9KLa5rl8UOqhR7mGavqhbZ85jQZwV kS4jP3gduKVaKMFaVc/WchwTHtIKrpugmD2xXbIW5BTml4u3K0fSquD2TRhgOdDV0wKK n0maLoAbrJYjnWlclXv/Uhd60T/evaiztTykLqM/hHfmGCFfYVWNQpbVcyzOsfT4gNO/ e3P06GJavnI+jgdY+31Ij8fljXNzy6OSyeiyOMfRX++R2gRLOqB/luS1uXpA3OI1zgSG e11A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UiQTRWquSJGKfu+1OF7vkd+0zRTj/Gaw6ElR6hhgdZY=; b=aonzw2Lo5W7qMawBGtdd7oGM/tUOHDUeEo/wr+j2t2ihwfX5kQPt92J2ofYAJm3E7K ws9+VHLmyKAVFq/BL3C3S8zMYzUQ7wpUxuRVfqjpacCvCVhJbqRv6RIPf+wYaHek9voV njcRvWZueB4PeSezTEf12tcowPLDM+H/1pSzOzzVDb1c2oTWHbvzV+PIwlpVYiJIS+1s y5iNlExz6QXRFzPFuY1UugvCVs2JNExrKx3mIOfgIsy3jbvxe4ON2O/oXDJLXJ9mpQpk 1TwhC8slWuAM0p7i7roWZ9zUfhFjc8eaSOX2Cvof79KOx9LlgWUs4+gY8hy6y4KByBZh r7MQ== X-Gm-Message-State: AO0yUKUHduT2eVcOwU+U9Wft0fB8Ux0jskKGpjgi3l7CrdXtSFKcrG1B /IrXIqGj15Yg+bYxgDEjZfwHYr0G4b2zc5M1ePQ= X-Google-Smtp-Source: AK7set/AiIfQ0XOVMgye+MKNg4dA7HAFSUh84tsisDRB99yyJS1vlgVvnL4ZN5JX8T44+aBHunsHKQ== X-Received: by 2002:a50:ce0e:0:b0:4aa:ffe2:3997 with SMTP id y14-20020a50ce0e000000b004aaffe23997mr18059421edi.40.1676232816010; Sun, 12 Feb 2023 12:13:36 -0800 (PST) Received: from bombaclaat ([2a01:598:b1b0:992:157d:949e:916b:98f2]) by smtp.gmail.com with ESMTPSA id dk19-20020a0564021d9300b0049e09105705sm5555229edb.62.2023.02.12.12.13.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 12:13:35 -0800 (PST) User-agent: mu4e 1.8.13; emacs 29.0.50 From: Roman Scherer Date: Sun, 12 Feb 2023 21:07:44 +0100 Message-ID: <86fsbavdzl.fsf@burningswell.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: none client-ip=2a00:1450:4864:20::52d; envelope-from=roman.scherer@burningswell.com; helo=mail-ed1-x52d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676232865; a=rsa-sha256; cv=none; b=AVH+0JoxdGZ825HH+pyLCGBxm2BQcZQyQjbUkz0j0jVQA8UXXBWt+S5pwZdFIV1XaWKf4o AueNvksHJwj72WVlPuzFOvuaEQC0dRrTe2T78wyLPzbn3OUSCw7rLr0CYNTJGm1+4oJsLE qjnUs8RFV0FCicDzp0nGU7+UOcfGjazBShkl5PzPMlOivzsEFVYwrrEZGBeIBKlpE+Vv4u UZ3nxcT2gHxSgHHRVLtICY2Ws3laClpaTDp0pFtMbBqTQATEpx9sOfXVc2L9qEkaZ57gK1 12vAJJTrsOZZQf/l82Zj0TRqVuhA5MWXs2HzmtcJhg2j+/cVaN0P3I+wmo+NCQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=burningswell-com.20210112.gappssmtp.com header.s=20210112 header.b=Yt6yZNtb; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676232865; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=UiQTRWquSJGKfu+1OF7vkd+0zRTj/Gaw6ElR6hhgdZY=; b=A3fZnVdxDYFZfG/KBkubqpNG7b+9X2c8yE1VicYPa01yPxSpR4fAuJb/SEEfw1xaeh0jiD WAg2Uu/twIoTPLCwuasdMop52tpa+vm64sBluBQUP0fOyIY61fTeZuontEJ5pQYecvQLPT EH61Jjovb5l8gvLlRGuG+uS0jSy1x5KdjGs1MUggA8Oy/yos7tPtQb6VadQ213OrH65Hd4 6B6kwnyvj02Xu2oUV8+Ux389R4buxOEQEkxOBsPYNRTX200/UYxlqMDawl9eOuTugFsOqz e+HcZF7GFuz0ajeFoSrvLLm2k9tiLUfJ2b+hUD8LOx/6oHwnbklrDYwc51/zjA== X-Migadu-Queue-Id: F177910F06 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=burningswell-com.20210112.gappssmtp.com header.s=20210112 header.b=Yt6yZNtb; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -5.72 X-Spam-Score: -5.72 X-TUID: Rc2KE3uduVOZ --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hello Guix, I'm running Guix on an aarch64 system that uses a Linux kernel configured with a page size of 16K. Some of the substitutes I receive from Guix sometimes do not work. I believe all packages that use jemalloc, which are quite a lot. Rust is one example. It fails like this: ``` [roman@bombaclaat guix]$ rustc : Unsupported system page size : Unsupported system page size : Unsupported system page size terminate called without an active exception Aborted ``` Building packages that depend on jemalloc also fail. I can't compile the rust package from Guix for example. This patch series updates jemalloc and enables the use of transparent huge pages on the aarch64 architecture. I saw we support THP as well for i686-linux and x86_64-linux, so I think it's fine to enable it here as well. At least it's better than crashing. The patch should also make it possible to use substitutes built on CI by systems running with larger kernel pages sizes, avoiding long compilation times for things like the whole rust toolchain. Since jemalloc has a lot of dependencies, I think it's a candidate for core-updates. I submitted parts of this patch series in another ticket where I tried to fix Icecat compilation on my aarch64 system. But I think it's worth a separate issue. And I'm blocked on the other issue at the moment. Could you please review the patchs? Thanks, Roman. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-jemalloc-Update-to-5.3.0.patch Content-Transfer-Encoding: quoted-printable From=20ae69696267b0651fb2be40e4b31584d1c84647b6 Mon Sep 17 00:00:00 2001 From: r0man Date: Sun, 5 Feb 2023 10:57:15 +0100 Subject: [PATCH 1/2] gnu: jemalloc: Update to 5.3.0. * gnu/packages/jemalloc.scm (jemalloc): Update to 5.3.0. =2D-- gnu/packages/jemalloc.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm index 2e25780257..354f07a838 100644 =2D-- a/gnu/packages/jemalloc.scm +++ b/gnu/packages/jemalloc.scm @@ -75,7 +75,7 @@ (define-public jemalloc-4.5.0 (define-public jemalloc (package (inherit jemalloc-4.5.0) =2D (version "5.2.1") + (version "5.3.0") (source (origin (method url-fetch) (uri (string-append @@ -83,7 +83,7 @@ (define-public jemalloc version "/jemalloc-" version ".tar.bz2")) (sha256 (base32 =2D "1xl7z0vwbn5iycg7amka9jd6hxd8nmfk7nahi4p9w2bnw9f0wcrl"))= )) + "1apyxjd1ixy4g8xkr61p0ny8jiz8vyv1j0k4nxqkxpqrf4g2vf1d")))) (arguments (substitute-keyword-arguments (package-arguments jemalloc-4.5.0) ;; Disable the thread local storage model in jemalloc 5 to prevent =2D-=20 2.38.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-gnu-jemalloc-Build-with-transparent-huge-pages-on-aa.patch Content-Transfer-Encoding: quoted-printable From=207818da5d28d15099594df897da0dc62e299dee43 Mon Sep 17 00:00:00 2001 From: r0man Date: Sun, 5 Feb 2023 10:59:06 +0100 Subject: [PATCH 2/2] gnu: jemalloc: Build with transparent huge pages on aarch64. * gnu/packages/jemalloc.scm (jemalloc-4.5.0): Build with transparent huge p= ages on aarch64. =2D-- gnu/packages/jemalloc.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm index 354f07a838..6c6ba0f568 100644 =2D-- a/gnu/packages/jemalloc.scm +++ b/gnu/packages/jemalloc.scm @@ -56,7 +56,7 @@ (define-public jemalloc-4.5.0 #t))) #:configure-flags '(,@(match (%current-system) =2D ((or "i686-linux" "x86_64-linux") + ((or "aarch64-linux" "i686-linux" "x86_64-linux") '()) ("powerpc-linux" (list "--disable-thp" "CPPFLAGS=3D-maltivec")) =2D-=20 2.38.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFTBAEBCAA9FiEE0iajOdjfRIFd3gygPdpSUn0qwZkFAmPpSG4fHHJvbWFuLnNj aGVyZXJAYnVybmluZ3N3ZWxsLmNvbQAKCRA92lJSfSrBmdCUB/0XTYNk+XdACfAk 7AKwRaRgdHYW9B8X1DeZLHMOS9qvNUAJElxJDtttEM56OqOJxojbbZyU4TfqXIS6 nO9aVrAu0xeukR6XHR4mP96NvTkVrodJdiNL8NdMsc7/eC8VAzATFm8m3+2FJdrM hgKa3cknt4qcDNqWI6AgGhHOHsnEAiUSZxtuoiMOsd9XzQQNsJ+3ZPwXvHbB5XcU mgvTeVaof+qA64DEgLe/zXBqxV9swG8RAK/MadMewx6GZIfTLiri8E6GTA8+BwO5 RIWslqnRhlHPW+lBv+bQQn53T12JvaLl5E+jXjCaLLjt/TDvyZxjtJqZ99Z/ddPN QkYgXQJj =V8cX -----END PGP SIGNATURE----- --==-=-=--