Tcache: Add tcache gc delay option.

This can reduce flushing frequency for small size classes.
This commit is contained in:
David Goldblatt 2020-05-11 16:24:17 -07:00 committed by David Goldblatt
parent d338dd45d7
commit ee72bf1cfd
4 changed files with 99 additions and 27 deletions

View file

@ -36,6 +36,11 @@ struct tcache_slow_s {
uint8_t lg_fill_div[SC_NBINS];
/* For small bins, whether has been refilled since last GC. */
bool bin_refilled[SC_NBINS];
/*
* For small bins, the number of items we can pretend to flush before
* actually flushing.
*/
uint8_t bin_flush_delay_items[SC_NBINS];
/*
* The start of the allocation containing the dynamic allocation for
* either the cache bins alone, or the cache bin memory as well as this