]> git.kaiwu.me - haproxy.git/commit
OPTIM: fd: make each thread group's polled_mask NUMA-local
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 20 Oct 2026 13:25:19 +0000 (15:25 +0200)
committerOlivier Houchard <cognet@ci0.org>
Wed, 21 Oct 2026 13:13:20 +0000 (15:13 +0200)
commit840d0ea42845a91a8c4ca7b4ac7f649bc928038f
treed520717e571ffbad08b8d1ab357640a7fb2b6795
parent4312f13a2d41e8dbb3e98c589ba5d2c86958b282
OPTIM: fd: make each thread group's polled_mask NUMA-local

The polled_mask array was left aside the fdtab's NUMA placement:
its slices are not padded to the page size, so a page can be shared
between two groups, and calloc() zeroes it eagerly on the boot
thread when the allocation is served from the heap. Allocate it
with mmap() and pad the slices as the fdtab: nothing is copied
nor zeroed, the pages are born zeroed and each group's masks are
written by its own threads, bound before they first touch them, so
the lazy faulting places them on the right node by itself.
src/fd.c