unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#61461] [PATCH core-updates] gnu: jemalloc: Build with THP support on aarch64.
@ 2023-02-12 20:07 Roman Scherer
  2023-03-02 10:05 ` Christopher Baines
  0 siblings, 1 reply; 3+ messages in thread
From: Roman Scherer @ 2023-02-12 20:07 UTC (permalink / raw)
  To: 61461


[-- Attachment #1.1: Type: text/plain, Size: 1417 bytes --]


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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-jemalloc-Update-to-5.3.0.patch --]
[-- Type: text/x-patch, Size: 1279 bytes --]

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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-gnu-jemalloc-Build-with-transparent-huge-pages-on-aa.patch --]
[-- Type: text/x-patch, Size: 967 bytes --]

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(-)

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 528 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#61461] [PATCH core-updates] gnu: jemalloc: Build with THP support on aarch64.
  2023-02-12 20:07 [bug#61461] [PATCH core-updates] gnu: jemalloc: Build with THP support on aarch64 Roman Scherer
@ 2023-03-02 10:05 ` Christopher Baines
  2023-03-03 13:05   ` Roman Scherer
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Baines @ 2023-03-02 10:05 UTC (permalink / raw)
  To: Roman Scherer; +Cc: 61461

[-- Attachment #1: Type: text/plain, Size: 1694 bytes --]


Roman Scherer <roman.scherer@burningswell.com> writes:

> 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?

The patches don't look to apply to core-updates, as far as I can see,
core-updates already has jemalloc 5.3.0 and doesn't pass the
--disable-thp flag for any architecture.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#61461] [PATCH core-updates] gnu: jemalloc: Build with THP support on aarch64.
  2023-03-02 10:05 ` Christopher Baines
@ 2023-03-03 13:05   ` Roman Scherer
  0 siblings, 0 replies; 3+ messages in thread
From: Roman Scherer @ 2023-03-03 13:05 UTC (permalink / raw)
  To: Christopher Baines; +Cc: 61461

[-- Attachment #1: Type: text/plain, Size: 1912 bytes --]


Hi Christopher,

ok, I see. Thanks for looking into this.

Christopher Baines <mail@cbaines.net> writes:

> [[PGP Signed Part:Undecided]]
>
> Roman Scherer <roman.scherer@burningswell.com> writes:
>
>> 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?
>
> The patches don't look to apply to core-updates, as far as I can see,
> core-updates already has jemalloc 5.3.0 and doesn't pass the
> --disable-thp flag for any architecture.
>
> [[End of PGP Signed Part]]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 528 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-03 13:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-12 20:07 [bug#61461] [PATCH core-updates] gnu: jemalloc: Build with THP support on aarch64 Roman Scherer
2023-03-02 10:05 ` Christopher Baines
2023-03-03 13:05   ` Roman Scherer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).