Return-Path: Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Aneesh Kumar" , "Linus Torvalds" , "Joonsoo Kim" , "KOSAKI Motohiro" , "Mizuma, Masayoshi" , "Naoya Horiguchi" , "Michal Hocko" Date: Fri, 16 May 2014 13:47:21 +0100 Message-ID: Subject: [PATCH 3.2 16/34] mm/hugetlb.c: add cond_resched_lock() in return_unused_surplus_pages() In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.2.59-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: "Mizuma, Masayoshi" 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 Signed-off-by: Naoya Horiguchi Cc: Joonsoo Kim Cc: Michal Hocko Cc: Aneesh Kumar Cc: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings --- mm/hugetlb.c | 1 + 1 file changed, 1 insertion(+) --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1078,6 +1078,7 @@ static void return_unused_surplus_pages( while (nr_pages--) { if (!free_pool_huge_page(h, &node_states[N_HIGH_MEMORY], 1)) break; + cond_resched_lock(&hugetlb_lock); } }