[Pkg-nginx-maintainers] Bug#1140605: nginx: Cache line size on loong64 may be too small
xiao sheng wen(肖盛文)
atzlinux at debian.org
Wed Jun 24 07:24:50 BST 2026
Hi,
在 2026/6/23 19:30, Colin Watson 写道:
> Source: nginx
> Version: 1.30.1-4
> Severity: normal
> X-Debbugs-Cc: debian-loongarch at lists.debian.org, debian-loongarch at lists.debian.org
> User: debian-loongarch at lists.debian.org
> Usertags: loong64
>
> I noticed that debusine's autopkgtests are failing on loong64 (e.g.
> https://ci.debian.net/packages/d/debusine/testing/loong64/72375884/).
> On investigation, I found this in its test artifacts:
>
> Jun 22 10:47:53 ci-173-ef19176d nginx[8035]: 2026/06/22 10:47:53 [emerg] 8035#8035: could not build server_names_hash, you should increase server_names_hash_bucket_size: 32
> Jun 22 10:47:53 ci-173-ef19176d nginx[8035]: nginx: configuration file /etc/nginx/nginx.conf test failed
>
> I suppose we could work around this in debusine, as suggested in
> https://nginx.org/en/docs/http/server_names.html#optimization. However,
> I think this message points to nginx being configured suboptimally on
> this architecture. The default value of server_names_hash_bucket_size
> is set to nginx's idea of the CPU cache line size. Looking at
> https://salsa.debian.org/nginx-team/nginx/-/blob/debian/latest/auto/os/conf,
> it seems that this is set based on matching the architecture name. No
> specific value is set for the case where $NGX_MACHINE is loongarch64, so
> it falls back to 32.
Your investigation is appreciate!
>
> I'm not an architecture expert, but looking at e.g.
> https://github.com/golang/go/blob/master/src/internal/cpu/cpu_loong64.go
> it seems as though 64 might be a better choice on this architecture.
> Could anyone on debian-loongarch@ confirm or contradict this?
Yes, 64 is a better choice on loong64 architecture. The following is run on my test loong64 machine: root at klx:~# arch loongarch64 root at klx:~# uname -a Linux klx 7.0.12+deb14-loong64 #1 SMP PREEMPT Debian 7.0.12-1 (2026-06-09) loongarch64 GNU/Linux root at klx:~# lscpu Architecture: loongarch64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 47 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Model name: Loongson-3A5000 CPU family: Loongson-64bit Model: 0x10 Thread(s) per core: 1 Core(s) per socket: 8 Socket(s): 1 BogoMIPS: 4000.00 Flags: cpucfg lam ual fpu lsx lasx crc32 ptw lspw lbt_x86 lbt_arm lbt_mips Caches (sum of all): L1d: 512 KiB (8 instances) L1i: 512 KiB (8 instances) L2: 2 MiB (8 instances) L3: 16 MiB (1 instance) NUMA: NUMA node(s): 1 NUMA node0 CPU(s): 0-7 Vulnerabilities: Gather data sampling: Not affected Ghostwrite: Not affected Indirect target selection: Not affected Itlb multihit: Not affected L1tf: Not affected Mds: Not
affected Meltdown: Not affected Mmio stale data: Not affected Old microcode: Not affected Reg file data sampling: Not affected Retbleed: Not affected Spec rstack overflow: Not affected Spec store bypass: Not affected Spectre v1: Mitigation; __user pointer sanitization Spectre v2: Not affected Srbds: Not affected Tsa: Not affected Tsx async abort: Not affected Vmscape: Not affected root at klx:~# cat /sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size 64 I also confirm this through the Chinese Wechat group with staff in loongson company. Regards,
--
肖盛文 xiao sheng wen -- Debian Developer(atzlinux)
Debian QA page: https://qa.debian.org/developer.php?login=atzlinux%40debian.org
Debian salsa: https://salsa.debian.org/atzlinux-guest
GnuPG Public Key: 0x00186602339240CB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x00186602339240CB.asc
Type: application/pgp-keys
Size: 39307 bytes
Desc: OpenPGP public key
URL: <http://alioth-lists.debian.net/pipermail/pkg-nginx-maintainers/attachments/20260624/3a455f8c/attachment-0001.asc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-nginx-maintainers/attachments/20260624/3a455f8c/attachment-0001.sig>
More information about the Pkg-nginx-maintainers
mailing list