[PATCH 1/4] mm/swap: Free non-hugetlb large folios in a batch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



free_unref_folios() can now handle non-hugetlb large folios, so
keep normal large folios in the batch.  hugetlb folios still need
special treatment (and I think they can be freed this way).

Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
---
 mm/swap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/swap.c b/mm/swap.c
index 6b697d33fa5b..d1e016e9ee1a 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -158,8 +158,8 @@ void put_pages_list(struct list_head *pages)
 	list_for_each_entry(folio, pages, lru) {
 		if (!folio_put_testzero(folio))
 			continue;
-		if (folio_test_large(folio)) {
-			__folio_put_large(folio);
+		if (folio_test_hugetlb(folio)) {
+			free_huge_folio(folio);
 			continue;
 		}
 		/* LRU flag must be clear because it's passed using the lru */
-- 
2.43.0





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux