(name . Guix Patches)(address . guix-patches@gnu.org)
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
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
<jemalloc>: 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.
From ae69696267b0651fb2be40e4b31584d1c84647b6 Mon Sep 17 00:00:00 2001
From: r0man <roman@burningswell.com>
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.
---
gnu/packages/jemalloc.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Toggle diff (24 lines)
diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm
index 2e25780257..354f07a838 100644
--- 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)
- (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
- "1xl7z0vwbn5iycg7amka9jd6hxd8nmfk7nahi4p9w2bnw9f0wcrl"))))
+ "1apyxjd1ixy4g8xkr61p0ny8jiz8vyv1j0k4nxqkxpqrf4g2vf1d"))))
(arguments
(substitute-keyword-arguments (package-arguments jemalloc-4.5.0)
;; Disable the thread local storage model in jemalloc 5 to prevent
--
2.38.1
From 7818da5d28d15099594df897da0dc62e299dee43 Mon Sep 17 00:00:00 2001
From: r0man <roman@burningswell.com>
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 pages on aarch64.
---
gnu/packages/jemalloc.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Toggle diff (15 lines)
diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm
index 354f07a838..6c6ba0f568 100644
--- 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)
- ((or "i686-linux" "x86_64-linux")
+ ((or "aarch64-linux" "i686-linux" "x86_64-linux")
'())
("powerpc-linux"
(list "--disable-thp" "CPPFLAGS=-maltivec"))
--
2.38.1
-----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-----