lundi 2 mars 2015

How to load the huge tlb (huge page) as a file system?



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.




Aucun commentaire:

Enregistrer un commentaire