* [merged mm-stable] mm-remove-use-of-folio-list-from-folios_put.patch removed from -mm tree
@ 2024-03-05 1:02 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-03-05 1:02 UTC (permalink / raw)
To: mm-commits, ryan.roberts, mgorman, david, willy, akpm
The quilt patch titled
Subject: mm: remove use of folio list from folios_put()
has been removed from the -mm tree. Its filename was
mm-remove-use-of-folio-list-from-folios_put.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: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: mm: remove use of folio list from folios_put()
Date: Tue, 27 Feb 2024 17:42:40 +0000
Instead of putting the interesting folios on a list, delete the
uninteresting one from the folio_batch.
Link: https://lkml.kernel.org/r/20240227174254.710559-7-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>
---
mm/swap.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
--- a/mm/swap.c~mm-remove-use-of-folio-list-from-folios_put
+++ a/mm/swap.c
@@ -961,12 +961,11 @@ void lru_cache_disable(void)
*/
void folios_put_refs(struct folio_batch *folios, unsigned int *refs)
{
- int i;
- LIST_HEAD(pages_to_free);
+ int i, j;
struct lruvec *lruvec = NULL;
unsigned long flags = 0;
- for (i = 0; i < folios->nr; i++) {
+ for (i = 0, j = 0; i < folios->nr; i++) {
struct folio *folio = folios->folios[i];
unsigned int nr_refs = refs ? refs[i] : 1;
@@ -1016,14 +1015,20 @@ void folios_put_refs(struct folio_batch
count_vm_event(UNEVICTABLE_PGCLEARED);
}
- list_add(&folio->lru, &pages_to_free);
+ if (j != i)
+ folios->folios[j] = folio;
+ j++;
}
if (lruvec)
unlock_page_lruvec_irqrestore(lruvec, flags);
+ if (!j) {
+ folio_batch_reinit(folios);
+ return;
+ }
- mem_cgroup_uncharge_list(&pages_to_free);
- free_unref_page_list(&pages_to_free);
- folio_batch_reinit(folios);
+ folios->nr = j;
+ mem_cgroup_uncharge_folios(folios);
+ free_unref_folios(folios);
}
EXPORT_SYMBOL(folios_put_refs);
_
Patches currently in -mm which might be from willy@infradead.org are
mm-separate-out-folio_flags-from-pageflags.patch
mm-remove-pagewaiters-pagesetwaiters-and-pageclearwaiters.patch
mm-remove-pageyoung-and-pageidle-definitions.patch
mm-add-__dump_folio.patch
mm-add-__dump_folio-fix.patch
mm-add-__dump_folio-fix-2.patch
mm-add-__dump_folio-fix-3.patch
mm-make-dump_page-take-a-const-argument.patch
mm-constify-testing-page-folio-flags.patch
mm-constify-more-page-folio-tests.patch
mm-remove-cast-from-page_to_nid.patch
mm-mempolicy-use-a-folio-in-do_mbind.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-05 1:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-05 1:02 [merged mm-stable] mm-remove-use-of-folio-list-from-folios_put.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.