enable tracker in ProxyLib by default
Description
Enable Tracking Provider in the Proxy Lib by default
It is currently disabled by default to not enable the Tracking Provider twice if both Proxy Lib and regular UMF is used in the same process (see https://github.com/oneapi-src/unified-memory-framework/issues/365 and fix https://github.com/oneapi-src/unified-memory-framework/pull/380).
However, in CAL scenarios where one process is using the Proxy Lib and the second uses IPC API for memory management, all the allocations in the first process have to be registered in the tracker. This PR enables Tracking Provider in the Proxy Lib by default and adds test for mix of Proxy Lib and IPC API.
Checklist
- [x] Code compiles without errors locally
- [x] All tests pass locally
- [x] CI workflows execute properly
- [x] New tests added, especially if they will fail without my changes
- [x] Added/extended example(s) to cover this functionality
- [x] Extended the README/documentation
- [x] Logger (with debug/info/... messages) is used
Just to note it here:
As we agreed yesterday, the proxy lib should ON the memory tracker for the proxy pool. In general memory tracker (as an essential part of UMF) should be always ON. For the use cases when tracking should be disabled for some reasons the umfPoolCreate already provides an option to disable memory tracking for a particular memory pool by specifying the UMF_POOL_CREATE_FLAG_DISABLE_TRACKING flag.
@bratpiorka What does this comment mean in the context of this PR (in trackingAllocationSplit())?
The first version of our duplicated pointer is added here:
https://github.com/oneapi-src/unified-memory-framework/blob/b4f149a8917d55b7757319d6c81ece3af29d2493/src/provider/provider_tracking.c#L224-L227
NOTE: I made separate PR https://github.com/oneapi-src/unified-memory-framework/pull/823 for the first commit
@bratpiorka rebase please
It looks good, it works with all tests present currently in the repo.
However some of the IPC tests for the devdax provider (#845) do not work with the proxy library - I do not know why yet (look for the line below:
[PID:9615 TID:9615 ERROR UMF] trackingAlloc: ptr already exists in the tracker ptr=0x7f2444600000, old size=2097152, new size=2097152, old pool 0x7f24843e80e8, new pool 0x7f24843e80e8, tracker 0x7f24843ed068)
I have submitted the issue for that: https://github.com/oneapi-src/unified-memory-framework/issues/864
@bratpiorka Rebase please