I am working on a research project and I have to share a large data structure between the kernel module and user space program. The data structure can be very large, and since the application is critical, I tried using shared memory to reduce the overhead of serializing the structure (using other interfaces, such as NetLink). Currently, I have made test code based on this link:
[ http://people.ee.ethz.ch/~arkeller/linux/kernel_user_space_howto.html#s8†[1]
They use debugfs. I added the code to the link in my kernel module, and I wrote a custom space program similar to them. I tried this with the small size of my file structure, which worked fine. You may notice in the code that they use only one page of memory. I wanted to know if there is an easy way to share much more memory than one page.
c linux shared-memory linux-kernel kernel
Aditya
source share