-
Notifications
You must be signed in to change notification settings - Fork 24
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 devdax memory provider #671
Add devdax memory provider #671
Conversation
aa65331
to
ac12c5c
Compare
What is a design and use case of the dax provider? Only to help "mmap" it? As free is not supported? |
ac12c5c
to
b57b578
Compare
To be able to provide memory from a /dev/dax (not extendable file). |
b57b578
to
94a48a9
Compare
0982211
to
110329d
Compare
110329d
to
3a8622a
Compare
@lplewa please resolve your issues. |
@bratpiorka please review |
15462b0
to
ca35caa
Compare
934e15e
to
6002495
Compare
6002495
to
583fb35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like one of the devdax test has failed
583fb35
to
ad62489
Compare
Fixed |
ad62489
to
f204a8b
Compare
cb2439e
to
69bb1e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are not supporting free, why we just do not mmap entire devdax at init? We can remove half of the code from this provider? mmap before first access do not cost us, so it should not be a problem.
c218854
to
62b9cc7
Compare
Because it is a memory provider that is supposed to handle many calls to |
62b9cc7
to
3968552
Compare
} | ||
|
||
/* devdax requires UMF_MEM_MAP_SHARED */ | ||
result = os_translate_mem_visibility_flag(UMF_MEM_MAP_SHARED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need dax/pmem mmap magic here? MAP_SYNC(and maybe MAP_SYNC_VALIDATE).
If yes, please add it, and second more important add test enuring that we are not going thru page cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lplewa mapping with MAP_SHARED_VALIDATE | MAP_SYNC
added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works:
32: [PID:167087 TID:167087 DEBUG UMF] os_devdax_mmap: devdax mapped with the (MAP_SHARED_VALIDATE | MAP_SYNC) flags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the test checking if devdax was mapped with the MAP_SYNC
flag.
Done
f32e1ee
to
a24ba42
Compare
a24ba42
to
21e453c
Compare
Signed-off-by: Lukasz Dorau <[email protected]>
Signed-off-by: Lukasz Dorau <[email protected]>
Signed-off-by: Lukasz Dorau <[email protected]>
21e453c
to
7654d79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is refactor needed - we should not have dependencies between providers. It might be better, to merge this PR(and propably file provider too) and fix this problem in the separate PR as it might be not small change. So i conditionally approve this pr, so if you decide to do refactor in the separate PR, you can merge this one.
#ifndef UMF_DEVDAX_MEMORY_PROVIDER_INTERNAL_H | ||
#define UMF_DEVDAX_MEMORY_PROVIDER_INTERNAL_H | ||
|
||
#include <umf/providers/provider_os_memory.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not have dependencies between providers. If we need share code, we should move it to utils.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree, but it will be a huge change, so I will do that in a separate PR (I have already started to do that).
Description
Add devdax memory provider.
Checklist