[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201016225254.3853109-3-guro@fb.com>
Date: Fri, 16 Oct 2020 15:52:54 -0700
From: Roman Gushchin <guro@...com>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: Zi Yan <ziy@...dia.com>, Joonsoo Kim <iamjoonsoo.kim@....com>,
Mike Kravetz <mike.kravetz@...cle.com>,
<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
<kernel-team@...com>, Roman Gushchin <guro@...com>
Subject: [PATCH rfc 2/2] mm: hugetlb: don't drop hugetlb_lock around cma_release() call
cma_release() now is a non-blocking function, so there is no more need
to drop hugetlb_lock to call it.
Signed-off-by: Roman Gushchin <guro@...com>
---
mm/hugetlb.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index fe76f8fd5a73..c8c892b1cabc 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1312,14 +1312,8 @@ static void update_and_free_page(struct hstate *h, struct page *page)
set_compound_page_dtor(page, NULL_COMPOUND_DTOR);
set_page_refcounted(page);
if (hstate_is_gigantic(h)) {
- /*
- * Temporarily drop the hugetlb_lock, because
- * we might block in free_gigantic_page().
- */
- spin_unlock(&hugetlb_lock);
destroy_compound_gigantic_page(page, huge_page_order(h));
free_gigantic_page(page, huge_page_order(h));
- spin_lock(&hugetlb_lock);
} else {
__free_pages(page, huge_page_order(h));
}
--
2.26.2
Powered by blists - more mailing lists