• Joonsoo Kim's avatar
    mm, hugetlb: return a reserved page to a reserved pool if failed · 07443a85
    Joonsoo Kim authored
    If we fail with a reserved page, just calling put_page() is not
    sufficient, because put_page() invoke free_huge_page() at last step and it
    doesn't know whether a page comes from a reserved pool or not.  So it
    doesn't do anything related to reserved count.  This makes reserve count
    lower than how we need, because reserve count already decrease in
    dequeue_huge_page_vma().  This patch fix this situation.
    Signed-off-by: default avatarJoonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com>
    Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
    Cc: Davidlohr Bueso <davidlohr@hp.com>
    Cc: David Gibson <david@gibson.dropbear.id.au>
    Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
    Cc: Hillf Danton <dhillf@gmail.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    07443a85
hugetlb.c 88.8 KB