* [merged mm-stable] mm-hugetlb-convert-dissolve_free_huge_page-to-folios.patch removed from -mm tree
@ 2022-12-12 2:14 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-12-12 2:14 UTC (permalink / raw)
To: mm-commits, willy, tsahu, songmuchun, mike.kravetz, linux,
linmiaohe, jhubbard, harperchen1110, david, almasrymina,
sidhartha.kumar, akpm
The quilt patch titled
Subject: mm/hugetlb: convert dissolve_free_huge_page() to folios
has been removed from the -mm tree. Its filename was
mm-hugetlb-convert-dissolve_free_huge_page-to-folios.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Subject: mm/hugetlb: convert dissolve_free_huge_page() to folios
Date: Tue, 29 Nov 2022 14:50:32 -0800
Removes compound_head() call by using a folio rather than a head page.
Link: https://lkml.kernel.org/r/20221129225039.82257-4-sidhartha.kumar@oracle.com
Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Mina Almasry <almasrymina@google.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Tarun Sahu <tsahu@linux.ibm.com>
Cc: Wei Chen <harperchen1110@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/hugetlb.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
--- a/mm/hugetlb.c~mm-hugetlb-convert-dissolve_free_huge_page-to-folios
+++ a/mm/hugetlb.c
@@ -2128,21 +2128,21 @@ static struct page *remove_pool_huge_pag
int dissolve_free_huge_page(struct page *page)
{
int rc = -EBUSY;
+ struct folio *folio = page_folio(page);
retry:
/* Not to disrupt normal path by vainly holding hugetlb_lock */
- if (!PageHuge(page))
+ if (!folio_test_hugetlb(folio))
return 0;
spin_lock_irq(&hugetlb_lock);
- if (!PageHuge(page)) {
+ if (!folio_test_hugetlb(folio)) {
rc = 0;
goto out;
}
- if (!page_count(page)) {
- struct page *head = compound_head(page);
- struct hstate *h = page_hstate(head);
+ if (!folio_ref_count(folio)) {
+ struct hstate *h = folio_hstate(folio);
if (!available_huge_pages(h))
goto out;
@@ -2150,7 +2150,7 @@ retry:
* We should make sure that the page is already on the free list
* when it is dissolved.
*/
- if (unlikely(!HPageFreed(head))) {
+ if (unlikely(!folio_test_hugetlb_freed(folio))) {
spin_unlock_irq(&hugetlb_lock);
cond_resched();
@@ -2165,7 +2165,7 @@ retry:
goto retry;
}
- remove_hugetlb_page(h, head, false);
+ remove_hugetlb_page(h, &folio->page, false);
h->max_huge_pages--;
spin_unlock_irq(&hugetlb_lock);
@@ -2177,12 +2177,12 @@ retry:
* Attempt to allocate vmemmmap here so that we can take
* appropriate action on failure.
*/
- rc = hugetlb_vmemmap_restore(h, head);
+ rc = hugetlb_vmemmap_restore(h, &folio->page);
if (!rc) {
- update_and_free_page(h, head, false);
+ update_and_free_page(h, &folio->page, false);
} else {
spin_lock_irq(&hugetlb_lock);
- add_hugetlb_page(h, head, false);
+ add_hugetlb_page(h, &folio->page, false);
h->max_huge_pages++;
spin_unlock_irq(&hugetlb_lock);
}
_
Patches currently in -mm which might be from sidhartha.kumar@oracle.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-12 2:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-12 2:14 [merged mm-stable] mm-hugetlb-convert-dissolve_free_huge_page-to-folios.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.