lkml.org 
[lkml]   [2021]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/2] mm: Make alloc_contig_range handle free hugetlb pages
    On 2021-02-18 14:59, Michal Hocko wrote:
    > As I've said. Page allocator can cope with NULL nodemask just fine.
    > I have checked the code and now remember the tricky part. It is
    > alloc_gigantic_page which cannot work with NULL nodemask because it
    > relies on for_each_node_mask and that, unlike zonelist iterator, cannot
    > cope with NULL node mask. This is the case only for !GFP_THISNODE.

    Ok, thanks for the clarification.

    > OK, I see the problem now. And your above solution is not really
    > optimal either. Your put_page would add the page to the pool and so it
    > could be used by somebody. One

    Yeah, that is right.

    > way around it would be either directly
    > manipulating reference count which is fugly or you can make it a
    > temporal page (alloc_migrate_huge_page) or maybe even better not
    > special
    > case this here but rather allow migrating free hugetlb pages in the
    > migrate_page path.

    I will have a look into it to see how what would look.

    Thanks for the feedback

    --
    Oscar Salvador
    SUSE L3

    \
     
     \ /
      Last update: 2021-02-18 19:54    [W:4.104 / U:1.500 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site