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 threshold to proxy lib to call system allocator #883

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Commits on Nov 14, 2024

  1. Fix format string

    Signed-off-by: Lukasz Dorau <[email protected]>
    ldorau committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    8cbe831 View commit details
    Browse the repository at this point in the history
  2. Fix checks in umfMemoryProviderAllocationSplit/Merge()

    Signed-off-by: Lukasz Dorau <[email protected]>
    ldorau committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    f074fc1 View commit details
    Browse the repository at this point in the history
  3. Do not assert(ptr) in umfMemoryTrackerGetAllocInfo()

    Do not assert(ptr) in umfMemoryTrackerGetAllocInfo(),
    return UMF_RESULT_ERROR_INVALID_ARGUMENT instead.
    Replace LOG_WARN() with LOG_DEBUG().
    ldorau committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    c99b876 View commit details
    Browse the repository at this point in the history
  4. Add utils_env_var_get_str() to utils_common

    Add utils_env_var_get_str() to utils_common.
    Use utils_env_var_get_str() inside utils_env_var_has_str()
    and utils_is_running_in_proxy_lib().
    
    Signed-off-by: Lukasz Dorau <[email protected]>
    ldorau committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    cf64635 View commit details
    Browse the repository at this point in the history
  5. Do not destroy tracker in umfTearDown() under the proxy library

    Signed-off-by: Lukasz Dorau <[email protected]>
    ldorau committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    2172179 View commit details
    Browse the repository at this point in the history
  6. Add size threshold to proxy lib to call system allocator (Linux only)

    Add a size threshold to proxy lib to call system allocator
    when the size is less than the given threshold (Linux only yet).
    
    Signed-off-by: Lukasz Dorau <[email protected]>
    ldorau committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    bb7d311 View commit details
    Browse the repository at this point in the history
  7. Add WA for the issue

    This WA for the issue:
    oneapi-src#894
    It protects us from a recursion in malloc_usable_size()
    when the JEMALLOC proxy_lib_pool is used.
    
    TODO: remove this WA when the issue is fixed.
    
    Signed-off-by: Lukasz Dorau <[email protected]>
    ldorau committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    f99b905 View commit details
    Browse the repository at this point in the history
  8. Add tests for the size threshold of the proxy library (Linux only)

    The proxyLib_size_threshold_* tests test the size threshold
    of the proxy library (Linux only yet). The size threshold
    is set to 64 bytes in this test, so all allocations of:
    1) size <  64 go through the default system allocator
       and (umfPoolByPtr(ptr_size < 64) == nullptr)
    2) size >= 64 go through the proxy lib allocator
       and (umfPoolByPtr(ptr_size >= 64) != nullptr).
    
    Ref: oneapi-src#894
    
    Signed-off-by: Lukasz Dorau <[email protected]>
    ldorau committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    ec89615 View commit details
    Browse the repository at this point in the history