[3/4] malloc: Increase tcache fill count from 16 to 32

Message ID caf71948871bae183861116341705e25e808b335.1782911956.git.fweimer@redhat.com (mailing list archive)
State New
Headers
Series malloc: Batched frees, tcache hysteresis behavior |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 fail Test failed

Commit Message

Florian Weimer July 1, 2026, 1:39 p.m. UTC
  This avoids a regression in the omnetpp and xalancbmk benchmarks
of SPEC.  Apparently, these benchmarks are very sensitive to the
fill rate in malloc.

Suggested-by: Wilco Dijkstra <wilco.dijkstra@arm.com>
Tested-by: Wilco Dijkstra <wilco.dijkstra@arm.com>
---
 malloc/malloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/malloc/malloc.c b/malloc/malloc.c
index 3505158ac0..61be8fe6bb 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -306,7 +306,7 @@  verify (PTRDIFF_MAX <= SIZE_MAX / 2);
 
 /* This is another arbitrary limit, which tunables can change.  Each
    tcache bin will hold at most this number of chunks.  */
-# define TCACHE_FILL_COUNT 16
+# define TCACHE_FILL_COUNT 32
 
 /* Maximum chunks in tcache bins for tunables.  This value must fit the range
    of tcache->num_slots[] entries, else they may overflow.  */