title: How to mount the huge tlb (huge page) as a file system?
body: <p>Here is my machine details (ubuntu):</p>
  
  <pre><code>$uname -a
  </code></pre>
  
  <p>Linux rex-think 3.13.0-46-generic #76-Ubuntu SMP Thu Feb 26 18:52:13 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux</p>
  
  <p>I have enabled huge page in root user with:</p>
  
  <pre><code>$echo 20 &gt; /proc/sys/vm/nr_hugepages
  </code></pre>
  
  <p>Now I want to mount huge page as a file system and open it for read/write, e.g., using the C API below</p>
  
  <pre><code>#define FILE_NAME "/mnt/hugepages/hello"
  fd = open(FILE_NAME, O_CREAT | O_RDWR, 0755);    // writing to huge page using file sys API
  </code></pre>
  
  <p>But I am not sure how to mount the huge page. In /proc/sys/vm/, I can see</p>
  
  <p>hugetlb_shm_group 
  hugepages_treat_as_movable</p>
  
  <p>but from the description <a href="https://www.kernel.org/doc/Documentation/sysctl/vm.txt" rel="nofollow">here</a>, I dont think they are the files I am looking for.</p>