Home
last modified time | relevance | path

Searched hist:"14 ef95be6f5558fb9e43aaf06ef9a1d6e0cae6c8" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/kernel/
H A Dfork.cdiff 14ef95be6f5558fb9e43aaf06ef9a1d6e0cae6c8 Wed Aug 23 00:06:09 CDT 2023 Mateusz Guzik <mjguzik@gmail.com> kernel/fork: group allocation/free of per-cpu counters for mm struct

A trivial execve scalability test which tries to be very friendly
(statically linked binaries, all separate) is predominantly bottlenecked
by back-to-back per-cpu counter allocations which serialize on global
locks.

Ease the pain by allocating and freeing them in one go.

Bench can be found here:
http://apollo.backplane.com/DFlyMisc/doexec.c

$ cc -static -O2 -o static-doexec doexec.c
$ ./static-doexec $(nproc)

Even at a very modest scale of 26 cores (ops/s):
before: 133543.63
after: 186061.81 (+39%)

While with the patch these allocations remain a significant problem,
the primary bottleneck shifts to page release handling.

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://lore.kernel.org/r/20230823050609.2228718-3-mjguzik@gmail.com
[Dennis: reflowed 1 line]
Signed-off-by: Dennis Zhou <dennis@kernel.org>