title: Large shared memory between Kernel space and user space
body: <p>I am working on a research project , and I have to share a large data structure between a kernel module and a user space program. The data structure can get very large, and since the application is performance critical, I tried using shared memory to reduce the overhead of serializing the structure(using other interfaces like NetLink). I currently made a test code based on the this link:</p>
  
  <p>[<a href="http://people.ee.ethz.ch/~arkeller/linux/kernel_user_space_howto.html#s8][1]" rel="nofollow noreferrer">http://people.ee.ethz.ch/~arkeller/linux/kernel_user_space_howto.html#s8][1]</a></p>
  
  <p>They are using <em>debugfs</em>.
  I added the code in the link into my kernel module, and I wrote a custom user space program similar to theirs. I tried it with small sizes of my datastructure which worked perfectly. You can notice in the code, they are sharing only 1 page of memory. I wanted to know if there is an easy way to share much more memory than just one page. </p>