Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Configure: set cache line sizes for more architectures

Sergey Kandaurov
March 27, 2024 01:58PM
> On 28 Feb 2024, at 05:24, Piotr Sikora via nginx-devel <nginx-devel@nginx.org> wrote:
>
> # HG changeset patch
> # User Piotr Sikora <piotr@aviatrix.com>
> # Date 1708977642 0
> # Mon Feb 26 20:00:42 2024 +0000
> # Branch patch016
> # Node ID bb99cbe3a343ae581d2369b990aee66e69679ca2
> # Parent f58bc1041ebca635517b919d58b49923bf24f76d
> Configure: set cache line sizes for more architectures.
>
> Signed-off-by: Piotr Sikora <piotr@aviatrix.com>

Thanks for the patch.

>
> diff -r f58bc1041ebc -r bb99cbe3a343 auto/os/conf
> --- a/auto/os/conf Mon Feb 26 20:00:40 2024 +0000
> +++ b/auto/os/conf Mon Feb 26 20:00:42 2024 +0000
> @@ -115,6 +115,21 @@
> NGX_MACH_CACHE_LINE=64
> ;;
>
> + ppc64 | ppc64le)

This can be replaced with a wildcard.
Also, other systems may report a different value, e.g.:

$ grep -r MACHINE_ARCH sys/powerpc/include/param.h
sys/powerpc/include/param.h:#ifndef MACHINE_ARCH
sys/powerpc/include/param.h:#define MACHINE_ARCH "powerpc64le"
sys/powerpc/include/param.h:#define MACHINE_ARCH "powerpc64"
sys/powerpc/include/param.h:#define MACHINE_ARCH "powerpcspe"
sys/powerpc/include/param.h:#define MACHINE_ARCH "powerpc"
sys/powerpc/include/param.h:#ifndef MACHINE_ARCH32
sys/powerpc/include/param.h:#define MACHINE_ARCH32 "powerpc"

As such, I pushed an updated version:
https://hg.nginx.org/nginx/rev/427aa785edf8

> + have=NGX_ALIGNMENT value=16 . auto/define
> + NGX_MACH_CACHE_LINE=128
> + ;;
> +
> + riscv64)
> + have=NGX_ALIGNMENT value=16 . auto/define
> + NGX_MACH_CACHE_LINE=64
> + ;;
> +
> + s390x)
> + have=NGX_ALIGNMENT value=16 . auto/define
> + NGX_MACH_CACHE_LINE=256
> + ;;
> +
> *)
> have=NGX_ALIGNMENT value=16 . auto/define
> NGX_MACH_CACHE_LINE=32


--
Sergey Kandaurov
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Configure: set cache line sizes for more architectures

Piotr Sikora via nginx-devel 324 February 27, 2024 08:26PM

Re: [PATCH] Configure: set cache line sizes for more architectures

Sergey Kandaurov 75 March 27, 2024 01:58PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 192
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 466 on July 09, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready