How can I use CXL for shared memory between two instances?

0
8
Asked By CuriousCoder77 On

I'm working with CXL and want to achieve shared memory access between two different instances (A and B). My plan is to have Instance A write data into CXL memory and then have Instance B read that same data from this shared memory pool. I'm focusing on doing this from user space without using a kernel module. Does anyone know of any sample code, libraries, or documentation that can help me understand how to use mmap() or access CXL memory from user space?

1 Answer

Answered By TechNerd42 On

It sounds tricky to want to access CXL memory directly from user space since it's often associated with the PCIe bus. There might be some limitations due to permissions, and it’s common to do this through kernel space instead. But you've got to explore your options!

CuriousCoder77 -

I believe I actually have user space access! My CXL memory pool is exposed as a dax device. I can open the device, mmap it, and write to the memory region. What I really want to know is if Instance B can see any updates when Instance A writes to that mapped region. Is there sample code for that? Would I need to handle coherency or cache issues?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.