Reputation: 3347
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.
Upvotes: 0
Views: 12242
Reputation: 5361
To mount huge tlp as file system use the below command
mount -t hugetlbfs nodev /mnt/huge
Upvotes: 3