Move cache index randomization out of extent.

This is logically at a higher level of the stack; extent should just allocate
things at the page-level; it shouldn't care exactly why the callers wants a
given number of pages.
This commit is contained in:
David Goldblatt
2020-03-08 10:11:02 -07:00
committed by David Goldblatt
parent 12be9f5727
commit 585f925055
5 changed files with 93 additions and 105 deletions

View File

@@ -120,10 +120,10 @@ large_ralloc_no_move_expand(tsdn_t *tsdn, edata_t *edata, size_t usize,
edata_t *trail;
bool new_mapping;
if ((trail = ecache_alloc(tsdn, arena, ehooks, &arena->ecache_dirty,
edata_past_get(edata), trailsize, 0, CACHELINE, false, SC_NSIZES,
edata_past_get(edata), trailsize, CACHELINE, false, SC_NSIZES,
&is_zeroed_trail)) != NULL
|| (trail = ecache_alloc(tsdn, arena, ehooks, &arena->ecache_muzzy,
edata_past_get(edata), trailsize, 0, CACHELINE, false, SC_NSIZES,
edata_past_get(edata), trailsize, CACHELINE, false, SC_NSIZES,
&is_zeroed_trail)) != NULL) {
if (config_stats) {
new_mapping = false;
@@ -131,7 +131,7 @@ large_ralloc_no_move_expand(tsdn_t *tsdn, edata_t *edata, size_t usize,
} else {
if ((trail = ecache_alloc_grow(tsdn, arena, ehooks,
&arena->ecache_retained, edata_past_get(edata), trailsize,
0, CACHELINE, false, SC_NSIZES, &is_zeroed_trail))
CACHELINE, false, SC_NSIZES, &is_zeroed_trail))
== NULL) {
return true;
}