diff mbox series

[bug#68261,2/2] gnu: rust-jemalloc-sys: Build with large page size.

Message ID c3d2e3f515fcf29588bf18d32ba50257b309b576.1704455408.git.roman@burningswell.com
State New
Headers show
Series Support 16K pages sizes with jemalloc on aarch64 | expand

Commit Message

Roman Scherer Jan. 5, 2024, 12:36 p.m. UTC
* gnu/packages/crates-io.scm (rust-jemalloc-sys): Build with large page size.

Change-Id: I91ed8450952204c1ecba19604521dd8b8ec554ec
---
 gnu/packages/crates-io.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Efraim Flashner Jan. 5, 2024, 12:48 p.m. UTC | #1
Since we don't carry the results of one rust package to the next and
have to rebuild everything, it would be better to add this to
(guix build cargo-build-system), in the configure phase. Then it will
apply to every package which is built using the cargo-build-system.

On Fri, Jan 05, 2024 at 01:36:42PM +0100, Roman Scherer wrote:
> * gnu/packages/crates-io.scm (rust-jemalloc-sys): Build with large page size.
> 
> Change-Id: I91ed8450952204c1ecba19604521dd8b8ec554ec
> ---
>  gnu/packages/crates-io.scm | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
> index 1bfd8fb143..f8eb0c293f 100644
> --- a/gnu/packages/crates-io.scm
> +++ b/gnu/packages/crates-io.scm
> @@ -39286,7 +39286,11 @@ (define-public rust-jemalloc-sys-0.5
>                 ;; https://github.com/tikv/jemallocator/issues/19
>                 (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1")
>                 (setenv "JEMALLOC_OVERRIDE"
> -                       (string-append jemalloc "/lib/libjemalloc_pic.a"))))))))
> +                       (string-append jemalloc "/lib/libjemalloc_pic.a")))))
> +         (add-after 'configure 'with-lg-page-jemalloc
> +           (lambda _
> +             (when (target-aarch64?)
> +               (setenv "JEMALLOC_SYS_WITH_LG_PAGE" "14")))))))
>      (native-inputs
>       (list jemalloc))
>      (home-page "https://github.com/tikv/jemallocator")
> -- 
> 2.41.0
> 
> 
>
Roman Scherer Jan. 5, 2024, 1:31 p.m. UTC | #2
Hi Efraim,

thanks for the review! I moved the setting of the
JEMALLOC_SYS_WITH_LG_PAGE now to the cargo build system, as you
suggested, and submitted a v2 of the patch series.

Can you have another look, please?

Thanks, Roman.

Efraim Flashner <efraim@flashner.co.il> writes:

> [[PGP Signed Part:Undecided]]
> Since we don't carry the results of one rust package to the next and
> have to rebuild everything, it would be better to add this to
> (guix build cargo-build-system), in the configure phase. Then it will
> apply to every package which is built using the cargo-build-system.
>
> On Fri, Jan 05, 2024 at 01:36:42PM +0100, Roman Scherer wrote:
>> * gnu/packages/crates-io.scm (rust-jemalloc-sys): Build with large page size.
>>
>> Change-Id: I91ed8450952204c1ecba19604521dd8b8ec554ec
>> ---
>>  gnu/packages/crates-io.scm | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
>> index 1bfd8fb143..f8eb0c293f 100644
>> --- a/gnu/packages/crates-io.scm
>> +++ b/gnu/packages/crates-io.scm
>> @@ -39286,7 +39286,11 @@ (define-public rust-jemalloc-sys-0.5
>>                 ;; https://github.com/tikv/jemallocator/issues/19
>>                 (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1")
>>                 (setenv "JEMALLOC_OVERRIDE"
>> -                       (string-append jemalloc "/lib/libjemalloc_pic.a"))))))))
>> +                       (string-append jemalloc "/lib/libjemalloc_pic.a")))))
>> +         (add-after 'configure 'with-lg-page-jemalloc
>> +           (lambda _
>> +             (when (target-aarch64?)
>> +               (setenv "JEMALLOC_SYS_WITH_LG_PAGE" "14")))))))
>>      (native-inputs
>>       (list jemalloc))
>>      (home-page "https://github.com/tikv/jemallocator")
>> --
>> 2.41.0
>>
>>
>>
diff mbox series

Patch

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 1bfd8fb143..f8eb0c293f 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -39286,7 +39286,11 @@  (define-public rust-jemalloc-sys-0.5
                ;; https://github.com/tikv/jemallocator/issues/19
                (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1")
                (setenv "JEMALLOC_OVERRIDE"
-                       (string-append jemalloc "/lib/libjemalloc_pic.a"))))))))
+                       (string-append jemalloc "/lib/libjemalloc_pic.a")))))
+         (add-after 'configure 'with-lg-page-jemalloc
+           (lambda _
+             (when (target-aarch64?)
+               (setenv "JEMALLOC_SYS_WITH_LG_PAGE" "14")))))))
     (native-inputs
      (list jemalloc))
     (home-page "https://github.com/tikv/jemallocator")