Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add arena.i.metadata_use_hooks #1

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

pbalcer
Copy link
Owner

@pbalcer pbalcer commented Aug 23, 2021

This new option controls whether the extent hooks are also
used for metadata allocation.

This has two main use cases:

  1. In heterogeneous memory systems, to avoid metadata
    being placed on potentially slower memory.

  2. Avoididing virtual memory from being leaked as a result
    of metadata allocation failure originating in an extent hook.

Specifically, this change allows the default alloc hook to used during
arenas.create.  One use case is to invoke the default alloc hook in a customized
hook arena, i.e. the default hooks can be read out of a default arena, then
create customized ones based on these hooks.  Note that mixing the default with
customized hooks is not recommended, and should only be considered when the
customization is simple and straightforward.
@pbalcer pbalcer force-pushed the metadata-default-hooks branch 4 times, most recently from bde4292 to 5d39daf Compare September 3, 2021 13:48
@pbalcer pbalcer force-pushed the metadata-default-hooks branch 2 times, most recently from cd72c7f to 7590234 Compare September 14, 2021 13:48
This mallctl accepts an arena_config_t structure which
can be used to customize the behavior of the arena.
Right now it contains extent_hooks and a new option,
metadata_use_hooks, which controls whether the extent
hooks are also used for metadata allocation.

The medata_use_hooks option has two main use cases:

1. In heterogeneous memory systems, to avoid metadata
being placed on potentially slower memory.

2. Avoiding virtual memory from being leaked as a result
of metadata allocation failure originating in an extent hook.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants