Commit 7848a4bf authored by Mizuma, Masayoshi's avatar Mizuma, Masayoshi Committed by Linus Torvalds

mm/hugetlb.c: add cond_resched_lock() in return_unused_surplus_pages()

soft lockup in freeing gigantic hugepage fixed in commit 55f67141 "mm:
hugetlb: fix softlockup when a large number of hugepages are freed." can
happen in return_unused_surplus_pages(), so let's fix it.
Signed-off-by: default avatarMasayoshi Mizuma <>
Signed-off-by: default avatarNaoya Horiguchi <>
Cc: Joonsoo Kim <>
Cc: Michal Hocko <>
Cc: Aneesh Kumar <>
Cc: KOSAKI Motohiro <>
Cc: <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 8b32201d
......@@ -1172,6 +1172,7 @@ static void return_unused_surplus_pages(struct hstate *h,
while (nr_pages--) {
if (!free_pool_huge_page(h, &node_states[N_MEMORY], 1))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment