Geom_grow: Don't keep the mutex internal.

We're about to use it in ways that will have external synchronization.
This commit is contained in:
David Goldblatt
2020-08-11 10:18:31 -07:00
committed by David Goldblatt
parent c57494879f
commit 5e90fd006e
6 changed files with 19 additions and 43 deletions

View File

@@ -13,12 +13,9 @@ struct geom_grow_s {
* retain_grow_limit is the max allowed size ind to expand (unless the
* required size is greater). Default is no limit, and controlled
* through mallctl only.
*
* Synchronization: mtx
*/
pszind_t next;
pszind_t limit;
malloc_mutex_t mtx;
};
static inline bool
@@ -48,9 +45,6 @@ geom_grow_size_commit(geom_grow_t *geom_grow, pszind_t skip) {
}
bool geom_grow_init(geom_grow_t *geom_grow);
void geom_grow_prefork(tsdn_t *tsdn, geom_grow_t *geom_grow);
void geom_grow_postfork_parent(tsdn_t *tsdn, geom_grow_t *geom_grow);
void geom_grow_postfork_child(tsdn_t *tsdn, geom_grow_t *geom_grow);
void geom_grow_init(geom_grow_t *geom_grow);
#endif /* JEMALLOC_INTERNAL_ECACHE_GROW_H */

View File

@@ -96,6 +96,7 @@ struct pac_s {
/* The grow info for the retained ecache. */
geom_grow_t geom_grow;
malloc_mutex_t grow_mtx;
/*
* Decay-based purging state, responsible for scheduling extent state