Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: remove PageActive

Patch series "Simplify the page flags a little".

In the course of our folio conversions, we have made many page flags only
used on folios, so we can now remove the page-based accessors. This
should cut down compile time a little, and prevent new users from cropping
up.

There is more that could be done in this area, but it would produce merge
conflicts, so I'll sit on those patches until next merge window. We now
have line of sight to removing PG_private_2 and PG_private.


This patch (of 10):

This flag is now only used on folios, so we can remove all the page
accessors.

[akpm@linux-foundation.org: fix arch/powerpc/mm/pgtable-frag.c]
Link: https://lkml.kernel.org/r/20240821193445.2294269-1-willy@infradead.org
Link: https://lkml.kernel.org/r/20240821193445.2294269-2-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Matthew Wilcox (Oracle) and committed by
Andrew Morton
bf03c806 04cb7502

+6 -5
+3 -3
arch/powerpc/mm/pgtable-frag.c
··· 136 136 #ifdef CONFIG_TRANSPARENT_HUGEPAGE 137 137 void pte_free_defer(struct mm_struct *mm, pgtable_t pgtable) 138 138 { 139 - struct page *page; 139 + struct folio *folio; 140 140 141 - page = virt_to_page(pgtable); 142 - SetPageActive(page); 141 + folio = virt_to_folio(pgtable); 142 + folio_set_active(folio); 143 143 pte_fragment_free((unsigned long *)pgtable, 0); 144 144 } 145 145 #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
+3 -2
include/linux/page-flags.h
··· 510 510 __CLEARPAGEFLAG(Dirty, dirty, PF_HEAD) 511 511 PAGEFLAG(LRU, lru, PF_HEAD) __CLEARPAGEFLAG(LRU, lru, PF_HEAD) 512 512 TESTCLEARFLAG(LRU, lru, PF_HEAD) 513 - PAGEFLAG(Active, active, PF_HEAD) __CLEARPAGEFLAG(Active, active, PF_HEAD) 514 - TESTCLEARFLAG(Active, active, PF_HEAD) 513 + FOLIO_FLAG(active, FOLIO_HEAD_PAGE) 514 + __FOLIO_CLEAR_FLAG(active, FOLIO_HEAD_PAGE) 515 + FOLIO_TEST_CLEAR_FLAG(active, FOLIO_HEAD_PAGE) 515 516 PAGEFLAG(Workingset, workingset, PF_HEAD) 516 517 TESTCLEARFLAG(Workingset, workingset, PF_HEAD) 517 518 PAGEFLAG(Checked, checked, PF_NO_COMPOUND) /* Used by some filesystems */