]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: pools: call pool_alloc_nocache() out of the pool's lock
authorWilly Tarreau <w@1wt.eu>
Thu, 15 Apr 2021 17:38:42 +0000 (19:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 Apr 2021 13:24:33 +0000 (15:24 +0200)
commit8ee9df57db622d518713c68cf7345794ed744330
treea3603e397c78412df1b2fe0c6a4dd83486229fc2
parent8fe726f1183c1c0cb16e4724ced89482712260ef
MINOR: pools: call pool_alloc_nocache() out of the pool's lock

In __pool_alloc(), historically we used to use factor out the
pool's lock between __pool_get_first() and __pool_refill_alloc(),
resulting in real malloc() or mmap() calls being performed under
the pool lock (for platforms using the locked shared pools).

As this is not needed anymore, let's move the call out of the
lock, it may improve allocation patterns on some platforms. This
also makes __pool_alloc() cleaner as we see a first attempt to
allocate from the local cache, then a second from the shared
cache then a reall allocation.
include/haproxy/pool.h