mm-hugetlb-move-the-error-handle-logic-out-of-normal-code-path.patch removed from -mm tree
Subsystems (2)
[email protected]
maintainerSubject: [merged] mm-hugetlb-move-the-error-handle-logic-out-of-normal-code-path.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 05 Jun 2014 12:52:57 -0700
The patch titled
Subject: mm, hugetlb: move the error handle logic out of normal code path
has been removed from the -mm tree. Its filename was
mm-hugetlb-move-the-error-handle-logic-out-of-normal-code-path.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Jianyu Zhan <[email protected]>
Subject: mm, hugetlb: move the error handle logic out of normal code path
alloc_huge_page() now mixes normal code path with error handle logic. This patches move out the error handle logic, to make normal code path more clean and redue code duplicate.
---
mm/hugetlb.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
mm/hugetlb.c renamed from mm/hugetlb.c~mm-hugetlb-move-the-error-handle-logic-out-of-normal-code-path +13 -13
@@ -1386,24 +1386,17 @@ static struct page *alloc_huge_page(strureturn ERR_PTR (-ENOSPC ); ret =hugetlb_cgroup_charge_cgroup (idx,pages_per_huge_page (h), &h_cg); -if (ret) { -if (chg || avoid_reserve) -hugepage_subpool_put_pages (spool,1 ); -return ERR_PTR (-ENOSPC ); - } +if (ret) + goto out_subpool_put; +spin_lock (&hugetlb_lock); page =dequeue_huge_page_vma (h, vma, addr, avoid_reserve, chg);if (!page) {spin_unlock (&hugetlb_lock); page =alloc_buddy_huge_page (h,NUMA_NO_NODE ); -if (!page) { -hugetlb_cgroup_uncharge_cgroup (idx, -pages_per_huge_page (h), - h_cg); -if (chg || avoid_reserve) -hugepage_subpool_put_pages (spool,1 ); -return ERR_PTR (-ENOSPC ); - } +if (!page) + goto out_uncharge_cgroup; +spin_lock (&hugetlb_lock);list_move (&page->lru, &h->hugepage_activelist);/* Fall through */
@@ -1415,6 +1408,13 @@ static struct page *alloc_huge_page(struvma_commit_reservation (h, vma, addr);return page; + +out_uncharge_cgroup: +hugetlb_cgroup_uncharge_cgroup (idx,pages_per_huge_page (h), h_cg); +out_subpool_put: +if (chg || avoid_reserve) +hugepage_subpool_put_pages (spool,1 ); +return ERR_PTR (-ENOSPC ); }/*
_
Patches currently in -mm which might be from [email protected] are
origin.patch
linux-next.patch mm-memcontrol-clean-up-memcg-zoneinfo-lookup.patch mm-memcontrol-remove-unnecessary-memcg-argument-from-soft-limit-functions.patch