diff mbox series

[bug#61461,core-updates] gnu: jemalloc: Build with THP support on aarch64.

Message ID 86fsbavdzl.fsf@burningswell.com
State New
Headers show
Series [bug#61461,core-updates] gnu: jemalloc: Build with THP support on aarch64. | expand

Commit Message

Roman Scherer Feb. 12, 2023, 8:07 p.m. UTC
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.

Comments

Christopher Baines March 2, 2023, 10:05 a.m. UTC | #1
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.
Roman Scherer March 3, 2023, 1:05 p.m. UTC | #2
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]]
diff mbox series

Patch

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