diff options
author | Mizuma, Masayoshi <m.mizuma@jp.fujitsu.com> | 2014-04-18 18:07:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-31 00:52:12 -0400 |
commit | b934932aa9b3e8e2361122cd0560b63c478081da (patch) | |
tree | 6ef3ca13fd209d25d103913af81de2468339e34d /mm | |
parent | fdc9aa48b7ca57c9e2154ad68bf0fcd731dabeb7 (diff) |
mm/hugetlb.c: add cond_resched_lock() in return_unused_surplus_pages()
commit 7848a4bf51b34f41fcc9bd77e837126d99ae84e3 upstream.
soft lockup in freeing gigantic hugepage fixed in commit 55f67141a892 "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 <m.mizuma@jp.fujitsu.com>
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/hugetlb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 8a7f27b42131..de73c9d144e1 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -1100,6 +1100,7 @@ static void return_unused_surplus_pages(struct hstate *h, | |||
1100 | while (nr_pages--) { | 1100 | while (nr_pages--) { |
1101 | if (!free_pool_huge_page(h, &node_states[N_MEMORY], 1)) | 1101 | if (!free_pool_huge_page(h, &node_states[N_MEMORY], 1)) |
1102 | break; | 1102 | break; |
1103 | cond_resched_lock(&hugetlb_lock); | ||
1103 | } | 1104 | } |
1104 | } | 1105 | } |
1105 | 1106 | ||