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

2024-03-27 Thread Sergey Kandaurov

> On 28 Feb 2024, at 05:24, Piotr Sikora via nginx-devel 
>  wrote:
> 
> # HG changeset patch
> # User Piotr Sikora 
> # Date 1708977642 0
> #  Mon Feb 26 20:00:42 2024 +
> # Branch patch016
> # Node ID bb99cbe3a343ae581d2369b990aee66e69679ca2
> # Parent  f58bc1041ebca635517b919d58b49923bf24f76d
> Configure: set cache line sizes for more architectures.
> 
> Signed-off-by: Piotr Sikora 

Thanks for the patch.

> 
> diff -r f58bc1041ebc -r bb99cbe3a343 auto/os/conf
> --- a/auto/os/conf Mon Feb 26 20:00:40 2024 +
> +++ b/auto/os/conf Mon Feb 26 20:00:42 2024 +
> @@ -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


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

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch
# User Piotr Sikora 
# Date 1708977642 0
#  Mon Feb 26 20:00:42 2024 +
# Branch patch016
# Node ID bb99cbe3a343ae581d2369b990aee66e69679ca2
# Parent  f58bc1041ebca635517b919d58b49923bf24f76d
Configure: set cache line sizes for more architectures.

Signed-off-by: Piotr Sikora 

diff -r f58bc1041ebc -r bb99cbe3a343 auto/os/conf
--- a/auto/os/conf  Mon Feb 26 20:00:40 2024 +
+++ b/auto/os/conf  Mon Feb 26 20:00:42 2024 +
@@ -115,6 +115,21 @@
 NGX_MACH_CACHE_LINE=64
 ;;
 
+ppc64 | ppc64le)
+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
___
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel