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

How to use SMDK to request CXL memory in kernel space? #27

Closed badseed-hub closed 7 months ago

badseed-hub commented 8 months ago

Hi~~ In user space, we can use "s_malloc" to request CXL memory; so if I'm in kernel space, what interface should I use to request CXL memory? Thanks a lot~~

KyungsanKim commented 8 months ago

Hi, Thank you for the meaningful question 👍 I also think the problem has to be addressed: Identifying CXL memory in kernelspace.

Until v1.5.1, SMDK used to provide an new explicit flag for kernelspace, __GFP_EXMEM. From SMDK v2.0, finds CXL memory using __GFP_MOVABLE && memory-node nodelist. Both are not perfact, but SMDK RFC.

At the moment, I believe we all need to find a sophisticated solution with a consensus.

Happy new year! :)