git: kernel - Vastly improve zalloc/zfree
Matthew Dillon
dillon at crater.dragonflybsd.org
Fri Dec 19 19:35:03 PST 2025
commit dcdf6bfdd71b8aae241f8a825bb32f3eea86f518
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Fri Dec 19 19:20:33 2025 -0800
kernel - Vastly improve zalloc/zfree
* Vastly improve zalloc/zfree by shifting items from the zone pool
to the zone's pcpu pool or back again opportunistically, and in
smaller chunks.
The opportunistic mechanism uses spin_trylock(), and so does not
contend at all. The regular spin_lock() is onl used when the counts
exceed the opportunistic limits.
* Should improve regular kernel performance under heavy loads.
* Vastly improves vkernel performance under multi-cpu loads due to pvzone
operation. However, note that the host still has strong contention on
the vkp->token that we need to address.
Summary of changes:
sys/vm/vm_zone.c | 131 ++++++++++++++++++++++++++++++++++++-------------------
1 file changed, 87 insertions(+), 44 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/dcdf6bfdd71b8aae241f8a825bb32f3eea86f518
--
DragonFly BSD source repository
More information about the Commits
mailing list