OpenMPDK / SMDK

SMDK, Scalable Memory Development Kit, is developed for Samsung CXL(Compute Express Link) Memory Expander to enable full-stack Software-Defined Memory system
271 stars 60 forks source link

Motivation and Purposed on Compatible and Optimized Paths #19

Closed pixiesunky closed 1 year ago

pixiesunky commented 1 year ago

Hi, I am looking at and studying the difference between Compatible and Optimized Paths and would like to analyze the Impact caused on the Same User Applications. As my understanding of Optimized Path from Wiki, user need to update the Memory Allocator API with New SMDK APIs, e.g. s_malloc,s_free. However, I have a quick check on s_malloc invocation and find the Memory Allocation Path seems s_malloc -> jemalloc -> Kernel System Call. So the Optimized Path still depends on the OS Kernel Space Efforts, Not a Totally User Space Work, so the Most efforts should be the Same with Compatible Path.

I thought before that the Optimized Path should be Useful for the Advanced Users who has CXL-aware features and can build up a Totaly User Space Memory Management Mechanism on top of CPU Host Memory Tiering, but it seems that is not the current CXL Optimized Direction.

Am I understanding Correctly?? It will be great if someone can help have a better understanding and on motivation and purpose of Optimized API Path.

Many Thanks

junhyeok-im commented 1 year ago

Hi pixiesunky, really thanks for your interest of this project. We have to more clearly deliver the meaning of the names of each path, i.e. 'compatible' and 'optimized', to you. The names were derived SMDK team's thought about how SMDK users could utilize CXL memory more easily and efficiently through SMDK allocator libraries. 'Compatible' path allows users to enable the library without or less modification of their applications, (= compatibility with exsisting applications) while 'Optimized' path allows users to optimize and modify applications through the library. (= possibility of optimizing existing applications)

To sum up and answer your question, the motivation and purpose of 'compatible' and 'optimized' are related to how allocator libraries can be used from the user's point of view, not related to kernel bypass or totally user space work.

Thanks!

Junhyeok Im.

pixiesunky commented 1 year ago

Hi Junhyeok

Many thanks for the further explaination and that is more clear for me now.

I will try some benchmarks with two paths and would like to check result on real device

Sounds interesting ^_^

KyungsanKim commented 1 year ago

Thank you pixiesunky, Your interest is helpful for us to decide the direction of CXL solution. It would be great if you share us the result of your BM and feedback.