min_size mount option(4.1)
• hugetlb subpool
• hugetlbfs のマウントごとのプール管理
• global pool (struct hstate) はマウント間で共有される。
• min_size マウントオプションにより、そのマウントで最低限
利用が保証される hugepage 数を指定できる (単位をつけて
バイト数指定やパーセント指定も可能)。
global pool
hugetlbfs on
/mnt/hugetlb1
hugetlbfs on
/mnt/hugetlb2
subpool
subpool
struct hugepage_subpool {
spinlock_t lock;
long count;
long max_hpages; /* Maximum huge pages or -1 if no maximum. */
long used_hpages; /* Used count against maximum, includes */
/* both alloced and reserved pages. */
struct hstate *hstate;
long min_hpages; /* Minimum huge pages or -1 if no minimum. */
long rsv_hpages; /* Pages reserved against global pool to */
/* sasitfy minimum size. */
};
struct hstate {
int next_nid_to_alloc;
int next_nid_to_free;
unsigned int order;
unsigned long mask;
unsigned long max_huge_pages;
unsigned long nr_huge_pages;
unsigned long free_huge_pages;
unsigned long resv_huge_pages;
unsigned long surplus_huge_pages;
unsigned long nr_overcommit_huge_pages;
...
mount –t hugetlbfs –o pagesize=2M,size=100,min_size=10 none /mnt/hugetlb1