linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
	x86@kernel.org
Subject: [PATCH 06/10] mm: Remove PageMlocked
Date: Wed, 21 Aug 2024 20:34:39 +0100	[thread overview]
Message-ID: <20240821193445.2294269-7-willy@infradead.org> (raw)
In-Reply-To: <20240821193445.2294269-1-willy@infradead.org>

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

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 Documentation/mm/unevictable-lru.rst |  4 ++--
 include/linux/page-flags.h           | 13 ++++++++-----
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/Documentation/mm/unevictable-lru.rst b/Documentation/mm/unevictable-lru.rst
index 2feb2ed51ae2..255ef12a432b 100644
--- a/Documentation/mm/unevictable-lru.rst
+++ b/Documentation/mm/unevictable-lru.rst
@@ -253,8 +253,8 @@ Basic Management
 
 mlocked pages - pages mapped into a VM_LOCKED VMA - are a class of unevictable
 pages.  When such a page has been "noticed" by the memory management subsystem,
-the page is marked with the PG_mlocked flag.  This can be manipulated using the
-PageMlocked() functions.
+the folio is marked with the PG_mlocked flag.  This can be manipulated using
+folio_set_mlocked() and folio_clear_mlocked() functions.
 
 A PG_mlocked page will be placed on the unevictable list when it is added to
 the LRU.  Such pages can be "noticed" by memory management in several places:
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index bdf24f65d998..f1358f86a673 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -585,12 +585,15 @@ FOLIO_FLAG(unevictable, FOLIO_HEAD_PAGE)
 	FOLIO_TEST_CLEAR_FLAG(unevictable, FOLIO_HEAD_PAGE)
 
 #ifdef CONFIG_MMU
-PAGEFLAG(Mlocked, mlocked, PF_NO_TAIL)
-	__CLEARPAGEFLAG(Mlocked, mlocked, PF_NO_TAIL)
-	TESTSCFLAG(Mlocked, mlocked, PF_NO_TAIL)
+FOLIO_FLAG(mlocked, FOLIO_HEAD_PAGE)
+	__FOLIO_CLEAR_FLAG(mlocked, FOLIO_HEAD_PAGE)
+	FOLIO_TEST_CLEAR_FLAG(mlocked, FOLIO_HEAD_PAGE)
+	FOLIO_TEST_SET_FLAG(mlocked, FOLIO_HEAD_PAGE)
 #else
-PAGEFLAG_FALSE(Mlocked, mlocked) __CLEARPAGEFLAG_NOOP(Mlocked, mlocked)
-	TESTSCFLAG_FALSE(Mlocked, mlocked)
+FOLIO_FLAG_FALSE(mlocked)
+	__FOLIO_CLEAR_FLAG_NOOP(mlocked)
+	FOLIO_TEST_CLEAR_FLAG_FALSE(mlocked)
+	FOLIO_TEST_SET_FLAG_FALSE(mlocked)
 #endif
 
 #ifdef CONFIG_ARCH_USES_PG_UNCACHED
-- 
2.43.0


  parent reply	other threads:[~2024-08-21 19:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 19:34 [PATCH 00/10] Simplify the page flags a little Matthew Wilcox (Oracle)
2024-08-21 19:34 ` [PATCH 01/10] mm: Remove PageActive Matthew Wilcox (Oracle)
2024-08-22 13:22   ` kernel test robot
2024-08-22 18:24     ` Andrew Morton
2024-08-22 18:34       ` Matthew Wilcox
2024-08-22 15:47   ` kernel test robot
2024-08-21 19:34 ` [PATCH 02/10] mm: Remove PageSwapBacked Matthew Wilcox (Oracle)
2024-08-21 19:34 ` [PATCH 03/10] mm: Remove PageReadahead Matthew Wilcox (Oracle)
2024-08-21 19:34 ` [PATCH 04/10] mm: Remove PageSwapCache Matthew Wilcox (Oracle)
2024-08-21 19:34 ` [PATCH 05/10] mm: Remove PageUnevictable Matthew Wilcox (Oracle)
2024-08-21 19:34 ` Matthew Wilcox (Oracle) [this message]
2024-08-21 19:34 ` [PATCH 07/10] mm: Remove PageOwnerPriv1 Matthew Wilcox (Oracle)
2024-08-21 19:34 ` [PATCH 08/10] mm: Remove page_has_private() Matthew Wilcox (Oracle)
2024-08-21 19:34 ` [PATCH 09/10] mm: Rename PG_mappedtodisk to PG_owner_2 Matthew Wilcox (Oracle)
2024-08-21 19:34 ` [PATCH 10/10] x86: Remove PG_uncached Matthew Wilcox (Oracle)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240821193445.2294269-7-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).