From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
To: akpm@linux-foundation.org, Motohiro.Kosaki@us.fujitsu.com
Cc: mhocko@suse.cz, kosaki.motohiro@jp.fujitsu.com,
iamjoonsoo.kim@lge.com, aneesh.kumar@linux.vnet.ibm.com,
m.mizuma@jp.fujitsu.com, linux-mm@kvack.org
Subject: [PATCH] mm/hugetlb.c: add cond_resched_lock() in return_unused_surplus_pages()
Date: Tue, 08 Apr 2014 17:46:25 -0400 [thread overview]
Message-ID: <53446e3a.2d508c0a.1866.ffff8020SMTPIN_ADDED_BROKEN@mx.google.com> (raw)
In-Reply-To: <6B2BA408B38BA1478B473C31C3D2074E30981E3EDC@SV-EXCHANGE1.Corp.FC.LOCAL>
On Tue, Apr 08, 2014 at 02:21:22PM -0700, Motohiro Kosaki wrote:
> Naoya
>
> > -----Original Message-----
> > From: Naoya Horiguchi [mailto:n-horiguchi@ah.jp.nec.com]
> > Sent: Tuesday, April 08, 2014 5:20 PM
> > To: akpm@linux-foundation.org
> > Cc: mhocko@suse.cz; Motohiro Kosaki JP; iamjoonsoo.kim@lge.com; aneesh.kumar@linux.vnet.ibm.com; m.mizuma@jp.fujitsu.com
> > Subject: Re: [merged] mm-hugetlb-fix-softlockup-when-a-large-number-of-hugepages-are-freed.patch removed from -mm tree
> >
> > Hi Andrew,
> > # off list
> >
> > This patch is obsolete and latest version is ver.2.
> > http://www.spinics.net/lists/linux-mm/msg71283.html
> > Could you queue the new one to go to mainline?
>
> [merged] mean the patch has already been merged the linus tree. So, it can be changed. Please make
> an incremental patch.
Here it is.
Thanks,
Naoya Horiguchi
---
Subject: [PATCH] mm/hugetlb.c: add cond_resched_lock() in return_unused_surplus_pages()
From: "Mizuma, Masayoshi" <m.mizuma@jp.fujitsu.com>
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>
Cc: <stable@vger.kernel.org>
---
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 7d57af2..761ef5b 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1160,6 +1160,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);
}
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next parent reply other threads:[~2014-04-08 21:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <534462dd./BWAtkVlKQGnheFN%akpm@linux-foundation.org>
[not found] ` <1396991970-aj1xjt2j@n-horiguchi@ah.jp.nec.com>
[not found] ` <6B2BA408B38BA1478B473C31C3D2074E30981E3EDC@SV-EXCHANGE1.Corp.FC.LOCAL>
2014-04-08 21:46 ` Naoya Horiguchi [this message]
[not found] ` <1396993585-zmuon97j@n-horiguchi@ah.jp.nec.com>
2014-04-08 23:57 ` Masayoshi Mizuma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53446e3a.2d508c0a.1866.ffff8020SMTPIN_ADDED_BROKEN@mx.google.com \
--to=n-horiguchi@ah.jp.nec.com \
--cc=Motohiro.Kosaki@us.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=m.mizuma@jp.fujitsu.com \
--cc=mhocko@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox