• Andrew Morton's avatar
    [PATCH] convert hugetlb code to use compound pages · b3a656b6
    Andrew Morton authored
    The odd thing about hugetlb is that it maintains its own freelist of pages.
    And it has to do that, else it would trivially run out of pages due to buddy
    fragmetation.
    
    So we we don't want callers of put_page() to be passing those pages
    to __free_pages_ok() on the final put().
    
    So hugetlb installs a destructor in the compound pages to point at
    free_huge_page(), which knows how to put these pages back onto the free list.
    
    Also, don't mark hugepages as all PageReserved any more.  That's preenting
    callers from doing proper refcounting.  Any code which does a user pagetable
    walk and hits part of a hugepage will now handle it transparently.
    b3a656b6
hugetlbpage.c 7.29 KB