mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	mm: allow non-hugetlb large folios to be batch processed
Hugetlb folios still get special treatment, but normal large folios can now be freed by free_unref_folios(). This should have a reasonable performance impact, TBD. Link: https://lkml.kernel.org/r/20240227174254.710559-11-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> Cc: David Hildenbrand <david@redhat.com> Cc: Mel Gorman <mgorman@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									31b2ff82ae
								
							
						
					
					
						commit
						f77171d241
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1003,12 +1003,13 @@ void folios_put_refs(struct folio_batch *folios, unsigned int *refs)
 | 
			
		|||
		if (!folio_ref_sub_and_test(folio, nr_refs))
 | 
			
		||||
			continue;
 | 
			
		||||
 | 
			
		||||
		if (folio_test_large(folio)) {
 | 
			
		||||
		/* hugetlb has its own memcg */
 | 
			
		||||
		if (folio_test_hugetlb(folio)) {
 | 
			
		||||
			if (lruvec) {
 | 
			
		||||
				unlock_page_lruvec_irqrestore(lruvec, flags);
 | 
			
		||||
				lruvec = NULL;
 | 
			
		||||
			}
 | 
			
		||||
			__folio_put_large(folio);
 | 
			
		||||
			free_huge_folio(folio);
 | 
			
		||||
			continue;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue