Re: [PATCH v3 10/18] mm: Allow non-hugetlb large folios to be batch processed

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

 



On Fri, Mar 08, 2024 at 08:34:15PM -0800, Andrew Morton wrote:
> 
> We seem to be coming down to the wire on this one - Linus might release
> 6.8 this weekend.
> 
> Will simply dropping "mm: allow non-hugetlb large folios to be batch
> processed" from mm-stable get us out of trouble?

We can add a fix patch which re-narrows the race to the point where it's
no longer observable.  Obviously we need to figure out what the real
problem is, but we could be going back a long way.  We've definitely
found two bugs in the process of investigating the problem (of arguable
import; the migration one merely wastes memory temporarily and it's not
entirely clear that the wrong-lock problem definitely causes a crash)

diff --git a/mm/swap.c b/mm/swap.c
index 6b697d33fa5b..7b1d3144391b 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -1012,6 +1012,8 @@ void folios_put_refs(struct folio_batch *folios, unsigned int *refs)
 			free_huge_folio(folio);
 			continue;
 		}
+		if (folio_test_large(folio) && folio_test_large_rmappable(folio))
+			folio_undo_large_rmappable(folio);
 
 		__page_cache_release(folio, &lruvec, &flags);
 




[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