Re: [RFC PATCH v4 2/9] tools headers: Add a macro to get HUGETLB page sizes for mmap

2021-03-14 Thread wangyanan (Y)
On 2021/3/12 19:14, Andrew Jones wrote: On Tue, Mar 02, 2021 at 08:57:44PM +0800, Yanan Wang wrote: We know that if a system supports multiple hugetlb page sizes, the desired hugetlb page size can be specified in bits [26:31] of the flag arguments. The value in these 6 bits will be the shift o

Re: [RFC PATCH v4 2/9] tools headers: Add a macro to get HUGETLB page sizes for mmap

2021-03-12 Thread Andrew Jones
On Tue, Mar 02, 2021 at 08:57:44PM +0800, Yanan Wang wrote: > We know that if a system supports multiple hugetlb page sizes, > the desired hugetlb page size can be specified in bits [26:31] > of the flag arguments. The value in these 6 bits will be the > shift of each hugetlb page size. > > So add

[RFC PATCH v4 2/9] tools headers: Add a macro to get HUGETLB page sizes for mmap

2021-03-02 Thread Yanan Wang
We know that if a system supports multiple hugetlb page sizes, the desired hugetlb page size can be specified in bits [26:31] of the flag arguments. The value in these 6 bits will be the shift of each hugetlb page size. So add a macro to get the page size shift and then calculate the corresponding