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 PageMlocked

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

Link: https://lkml.kernel.org/r/20240821193445.2294269-7-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
99f86bbd cb29e794

+10 -7
+2 -2
Documentation/mm/unevictable-lru.rst
··· 253 253 254 254 mlocked pages - pages mapped into a VM_LOCKED VMA - are a class of unevictable 255 255 pages. When such a page has been "noticed" by the memory management subsystem, 256 - the page is marked with the PG_mlocked flag. This can be manipulated using the 257 - PageMlocked() functions. 256 + the folio is marked with the PG_mlocked flag. This can be manipulated using 257 + folio_set_mlocked() and folio_clear_mlocked() functions. 258 258 259 259 A PG_mlocked page will be placed on the unevictable list when it is added to 260 260 the LRU. Such pages can be "noticed" by memory management in several places:
+8 -5
include/linux/page-flags.h
··· 585 585 FOLIO_TEST_CLEAR_FLAG(unevictable, FOLIO_HEAD_PAGE) 586 586 587 587 #ifdef CONFIG_MMU 588 - PAGEFLAG(Mlocked, mlocked, PF_NO_TAIL) 589 - __CLEARPAGEFLAG(Mlocked, mlocked, PF_NO_TAIL) 590 - TESTSCFLAG(Mlocked, mlocked, PF_NO_TAIL) 588 + FOLIO_FLAG(mlocked, FOLIO_HEAD_PAGE) 589 + __FOLIO_CLEAR_FLAG(mlocked, FOLIO_HEAD_PAGE) 590 + FOLIO_TEST_CLEAR_FLAG(mlocked, FOLIO_HEAD_PAGE) 591 + FOLIO_TEST_SET_FLAG(mlocked, FOLIO_HEAD_PAGE) 591 592 #else 592 - PAGEFLAG_FALSE(Mlocked, mlocked) __CLEARPAGEFLAG_NOOP(Mlocked, mlocked) 593 - TESTSCFLAG_FALSE(Mlocked, mlocked) 593 + FOLIO_FLAG_FALSE(mlocked) 594 + __FOLIO_CLEAR_FLAG_NOOP(mlocked) 595 + FOLIO_TEST_CLEAR_FLAG_FALSE(mlocked) 596 + FOLIO_TEST_SET_FLAG_FALSE(mlocked) 594 597 #endif 595 598 596 599 #ifdef CONFIG_ARCH_USES_PG_UNCACHED