Skip to content

Commit

Permalink
mm/hugetlb.c: add cond_resched_lock() in return_unused_surplus_pages()
Browse files Browse the repository at this point in the history
soft lockup in freeing gigantic hugepage fixed in commit 55f6714 "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: Masayoshi Mizuma <[email protected]>
Signed-off-by: Naoya Horiguchi <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Aneesh Kumar <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
mmizuma authored and torvalds committed Apr 18, 2014
1 parent 8b32201 commit 7848a4b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
break;
cond_resched_lock(&hugetlb_lock);
}
}

Expand Down

0 comments on commit 7848a4b

Please sign in to comment.