Skip to content

Commit 7848a4b

Browse files
mmizumatorvalds
authored andcommitted
mm/hugetlb.c: add cond_resched_lock() in return_unused_surplus_pages()
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]>
1 parent 8b32201 commit 7848a4b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mm/hugetlb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,7 @@ static void return_unused_surplus_pages(struct hstate *h,
11721172
while (nr_pages--) {
11731173
if (!free_pool_huge_page(h, &node_states[N_MEMORY], 1))
11741174
break;
1175+
cond_resched_lock(&hugetlb_lock);
11751176
}
11761177
}
11771178

0 commit comments

Comments
 (0)