0

Here is my machine details (ubuntu):

$uname -a

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

I have enabled huge page in root user with:

$echo 20 > /proc/sys/vm/nr_hugepages

Now I want to mount huge page as a file system and open it for read/write, e.g., using the C API below

#define FILE_NAME "/mnt/hugepages/hello"
fd = open(FILE_NAME, O_CREAT | O_RDWR, 0755);    // writing to huge page using file sys API

But I am not sure how to mount the huge page. In /proc/sys/vm/, I can see

hugetlb_shm_group hugepages_treat_as_movable

but from the description here, I dont think they are the files I am looking for.

drdot
  • 3,215
  • 9
  • 46
  • 81

1 Answers1

3

To mount huge tlp as file system use the below command

mount -t hugetlbfs nodev /mnt/huge
Santosh A
  • 5,173
  • 27
  • 37
  • Thanks for the answer. I have encounter the next problem. Could you also give your feedback here? http://stackoverflow.com/questions/28826470/mmap-failed-when-trying-to-map-huge-page-1mb – drdot Mar 03 '15 at 07:40