mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 14:41:42 +03:00
Option to guard hpa_min_purge_interval_ms fix
Change in `hpa_min_purge_interval_ms` handling logic is not backward compatible as it might increase memory usage. Now this logic guarded by `hpa_strict_min_purge_interval` option. When `hpa_strict_min_purge_interval` is true, we will purge no more than `hpa_min_purge_interval_ms`. When `hpa_strict_min_purge_interval` is false, old purging logic behaviour is preserved. Long term strategy migrate all users of hpa to new logic and then delete `hpa_strict_min_purge_interval` option.
This commit is contained in:
parent
91a6d230db
commit
867c6dd7dc
6 changed files with 27 additions and 6 deletions
|
|
@ -49,6 +49,14 @@ struct hpa_shard_opts_s {
|
|||
* Minimum amount of time between purges.
|
||||
*/
|
||||
uint64_t min_purge_interval_ms;
|
||||
|
||||
/*
|
||||
* Strictly respect minimum amout of time between purges.
|
||||
*
|
||||
* This is an option to provide backward compatibility for staged rollout of
|
||||
* purging logic fix.
|
||||
*/
|
||||
bool strict_min_purge_interval;
|
||||
};
|
||||
|
||||
#define HPA_SHARD_OPTS_DEFAULT { \
|
||||
|
|
@ -69,7 +77,9 @@ struct hpa_shard_opts_s {
|
|||
/* hugify_delay_ms */ \
|
||||
10 * 1000, \
|
||||
/* min_purge_interval_ms */ \
|
||||
5 * 1000 \
|
||||
5 * 1000, \
|
||||
/* strict_min_purge_interval */ \
|
||||
false \
|
||||
}
|
||||
|
||||
#endif /* JEMALLOC_INTERNAL_HPA_OPTS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue