Skip to content

Remove the UMF_MEM_MAP_SYNC flag #887

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

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

ldorau
Copy link
Contributor

@ldorau ldorau commented Nov 12, 2024

Description

Remove the UMF_MEM_MAP_SYNC flag,
UMF_MEM_MAP_SHARED should be used instead.

Verify if /dev/dax was mapped with MAP_SYNC.

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly

@ldorau ldorau requested a review from a team as a code owner November 12, 2024 09:24
@ldorau ldorau mentioned this pull request Nov 12, 2024
3 tasks
@@ -21,7 +21,8 @@ extern "C" {
typedef enum umf_memory_visibility_t {
UMF_MEM_MAP_PRIVATE = 1, ///< private memory mapping
UMF_MEM_MAP_SHARED, ///< shared memory mapping (Linux only)
UMF_MEM_MAP_SYNC, ///< direct mapping of persistent memory (supported only for files supporting DAX, Linux only)
UMF_MEM_MAP_SYNC =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think attribute((deprecated)) should work here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please just redefine new flag (remove "UMF_MEM_MAP_SYNC =")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the UMF tech meeting, we agreed that UMF_MEM_MAP_SYNC can be simply removed.

It is an API/ABI breaking change but in this particular case, it is OK because we are mostly sure that nobody uses it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.
Done

@ldorau ldorau changed the title Deprecate the UMF_MEM_MAP_SYNC flag Remove the UMF_MEM_MAP_SYNC flag Nov 13, 2024
@ldorau ldorau force-pushed the Deprecate_the_UMF_MEM_MAP_SYNC_flag branch from ab94622 to 2e81b59 Compare November 13, 2024 11:38
Make utils_mmap_file() detect DAX using MAP_SYNC flag.
Add bool *map_sync argument to utils_mmap_file().
map_sync is set to true only if memory was mapped with MAP_SYNC,
what means it is a DAX file/device.

Signed-off-by: Lukasz Dorau <[email protected]>
Remove the UMF_MEM_MAP_SYNC flag,
UMF_MEM_MAP_SHARED should be used instead.

Verify if /dev/dax was mapped with MAP_SYNC.

Signed-off-by: Lukasz Dorau <[email protected]>
@ldorau ldorau force-pushed the Deprecate_the_UMF_MEM_MAP_SYNC_flag branch from 2e81b59 to 199e754 Compare November 13, 2024 11:41
@ldorau ldorau merged commit 508162e into oneapi-src:main Nov 13, 2024
77 checks passed
@ldorau ldorau deleted the Deprecate_the_UMF_MEM_MAP_SYNC_flag branch November 13, 2024 17:29
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.

4 participants