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

CTL - setting by handle #1062

Open
KFilipek opened this issue Jan 27, 2025 · 1 comment · May be fixed by #1073
Open

CTL - setting by handle #1062

KFilipek opened this issue Jan 27, 2025 · 1 comment · May be fixed by #1073
Assignees
Labels
enhancement New feature or request

Comments

@KFilipek
Copy link
Contributor

KFilipek commented Jan 27, 2025

CTL - setting values by handle

Rationale

This issue will be discussed and summarized in the implementation for the by_handle part of the CTL.
This issue is a part of: #1036

Description

The CTL for a handle is the way to set values for a specific pool or provider.

"umf.pool.by_handle.disjoint.MaxPoolableSize"

API Changes

The current API should be unchanged.

Examples of use

// Current
ctl_query(global_tree, pointer_to_pool, CTL_QUERY_PROGRAMMATIC, "umf.pool.by_handle.disjoint.MaxPoolableSize", CTL_QUERY_READ, &value);
// Desired
umfCtlGet("umf.pool.by_handle.disjoint.MaxPoolableSize", pointer_to_pool, &value);

Implementation details

The current approach assumes a handle to a pool or a provider will be passed as context. Because of the lack of support for params in the name like %p, %s, or {} it should be determined using a new type of leaf or node.

The implementation should be split into 2 parts, first is the main CTL tree:

umf
├── pool
|   └── by_handle
|       └── SUB_TREE (aka NAME)
└── provider
    └── by_handle
        └── SUB_TREE (aka NAME)

After encountering SUB_TREE there should be located a proper CTL tree, appropriate for the mentioned type:

disjoint sub-tree
├── SlabMinSize (size_t)
├── MaxPoolableSize (size_t)
├── Capacity (size_t)
├── MinBucketSize (size_t)
├── CurPoolSize (size_t)
├── PoolTrace (int)
└── Name (char *)

Meta

@KFilipek KFilipek added the enhancement New feature or request label Jan 27, 2025
@KFilipek KFilipek self-assigned this Jan 27, 2025
@bratpiorka
Copy link
Contributor

shouldn't the CTL string be "umf.pool.disjoint.by_handle.%p.MaxPoolableSize" ?
"by_handle" explicitly shows that the next field would be a ptr
Also, "disjoint" should go before the handle, as logically the the handle is an instance of the Disjoint Pool.

@KFilipek KFilipek linked a pull request Feb 4, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants