Thread (34 messages) 34 messages, 5 authors, 2016-12-05

[PATCH V2 fix 5/6] mm: hugetlb: add a new function to allocate a new gigantic page

From: Huang Shijie <hidden>
Date: 2016-12-05 03:15:55
Also in: linux-mm

On Fri, Dec 02, 2016 at 03:03:30PM +0100, Michal Hocko wrote:
On Wed 16-11-16 14:55:04, Huang Shijie wrote:
quoted
There are three ways we can allocate a new gigantic page:

1. When the NUMA is not enabled, use alloc_gigantic_page() to get
   the gigantic page.

2. The NUMA is enabled, but the vma is NULL.
   There is no memory policy we can refer to.
   So create a @nodes_allowed, initialize it with init_nodemask_of_mempolicy()
   or init_nodemask_of_node(). Then use alloc_fresh_gigantic_page() to get
   the gigantic page.

3. The NUMA is enabled, and the vma is valid.
   We can follow the memory policy of the @vma.

   Get @nodes_allowed by huge_nodemask(), and use alloc_fresh_gigantic_page()
   to get the gigantic page.
Again __hugetlb_alloc_gigantic_page is not used and it is hard to deduce
its usage from this commit. The above shouldn't be really much different from
Okay, I will merge it into the later patch.
what we do in alloc_pages_vma so please make sure to check it before
coming up with something hugetlb specific.
No problem. Thanks for the hint.

Thanks
Huang Shijie
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help