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
Subject: [PATCH 09/10] Remove references to page->flags in documentation
Date: Tue, 26 Mar 2024 17:10:31 +0000 [thread overview]
Message-ID: <20240326171045.410737-10-willy@infradead.org> (raw)
In-Reply-To: <20240326171045.410737-1-willy@infradead.org>
Mostly rewording, but remove entirely the copy of page_fixed_fake_head()
in the documentation; we can refer people to the actual source if
necessary.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
.../admin-guide/cgroup-v1/memory.rst | 4 ++--
Documentation/mm/vmemmap_dedup.rst | 22 +------------------
.../translations/zh_CN/core-api/cachetlb.rst | 2 +-
mm/migrate.c | 2 +-
mm/rmap.c | 4 ++--
5 files changed, 7 insertions(+), 27 deletions(-)
diff --git a/Documentation/admin-guide/cgroup-v1/memory.rst b/Documentation/admin-guide/cgroup-v1/memory.rst
index ca7d9402f6be..46110e6a31bb 100644
--- a/Documentation/admin-guide/cgroup-v1/memory.rst
+++ b/Documentation/admin-guide/cgroup-v1/memory.rst
@@ -300,14 +300,14 @@ When oom event notifier is registered, event will be delivered.
Lock order is as follows::
- Page lock (PG_locked bit of page->flags)
+ folio_lock
mm->page_table_lock or split pte_lock
folio_memcg_lock (memcg->move_lock)
mapping->i_pages lock
lruvec->lru_lock.
Per-node-per-memcgroup LRU (cgroup's private LRU) is guarded by
-lruvec->lru_lock; PG_lru bit of page->flags is cleared before
+lruvec->lru_lock; the folio LRU flag is cleared before
isolating a page from its LRU under lruvec->lru_lock.
.. _cgroup-v1-memory-kernel-extension:
diff --git a/Documentation/mm/vmemmap_dedup.rst b/Documentation/mm/vmemmap_dedup.rst
index 593ede6d314b..b4a55b6569fa 100644
--- a/Documentation/mm/vmemmap_dedup.rst
+++ b/Documentation/mm/vmemmap_dedup.rst
@@ -180,27 +180,7 @@ this correctly. There is only **one** head ``struct page``, the tail
``struct page`` with ``PG_head`` are fake head ``struct page``. We need an
approach to distinguish between those two different types of ``struct page`` so
that ``compound_head()`` can return the real head ``struct page`` when the
-parameter is the tail ``struct page`` but with ``PG_head``. The following code
-snippet describes how to distinguish between real and fake head ``struct page``.
-
-.. code-block:: c
-
- if (test_bit(PG_head, &page->flags)) {
- unsigned long head = READ_ONCE(page[1].compound_head);
-
- if (head & 1) {
- if (head == (unsigned long)page + 1)
- /* head struct page */
- else
- /* tail struct page */
- } else {
- /* head struct page */
- }
- }
-
-We can safely access the field of the **page[1]** with ``PG_head`` because the
-page is a compound page composed with at least two contiguous pages.
-The implementation refers to ``page_fixed_fake_head()``.
+parameter is the tail ``struct page`` but with ``PG_head``.
Device DAX
==========
diff --git a/Documentation/translations/zh_CN/core-api/cachetlb.rst b/Documentation/translations/zh_CN/core-api/cachetlb.rst
index b4a76ec75daa..64295c61d1c1 100644
--- a/Documentation/translations/zh_CN/core-api/cachetlb.rst
+++ b/Documentation/translations/zh_CN/core-api/cachetlb.rst
@@ -260,7 +260,7 @@ HyperSparc cpu就是这样一个具有这种属性的cpu。
如果D-cache别名不是一个问题,这个程序可以简单地定义为该架构上
的nop。
- 在page->flags (PG_arch_1)中有一个位是“架构私有”。内核保证,
+ 在folio->flags (PG_arch_1)中有一个位是“架构私有”。内核保证,
对于分页缓存的页面,当这样的页面第一次进入分页缓存时,它将清除
这个位。
diff --git a/mm/migrate.c b/mm/migrate.c
index 6dc73c438717..5c546583594d 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -113,7 +113,7 @@ bool isolate_movable_page(struct page *page, isolate_mode_t mode)
if (!mops->isolate_page(&folio->page, mode))
goto out_no_isolated;
- /* Driver shouldn't use PG_isolated bit of page->flags */
+ /* Driver shouldn't use the isolated flag */
WARN_ON_ONCE(folio_test_isolated(folio));
folio_set_isolated(folio);
folio_unlock(folio);
diff --git a/mm/rmap.c b/mm/rmap.c
index d52759aa3ff7..5ee9e338d09b 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -23,7 +23,7 @@
* inode->i_rwsem (while writing or truncating, not reading or faulting)
* mm->mmap_lock
* mapping->invalidate_lock (in filemap_fault)
- * page->flags PG_locked (lock_page)
+ * folio_lock
* hugetlbfs_i_mmap_rwsem_key (in huge_pmd_share, see hugetlbfs below)
* vma_start_write
* mapping->i_mmap_rwsem
@@ -50,7 +50,7 @@
* hugetlb_fault_mutex (hugetlbfs specific page fault mutex)
* vma_lock (hugetlb specific lock for pmd_sharing)
* mapping->i_mmap_rwsem (also used for hugetlb pmd sharing)
- * page->flags PG_locked (lock_page)
+ * folio_lock
*/
#include <linux/mm.h>
--
2.43.0
next prev parent reply other threads:[~2024-03-26 17:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 17:10 [PATCH 00/10] Various page->flags cleanups Matthew Wilcox (Oracle)
2024-03-26 17:10 ` [PATCH 01/10] sh: Remove use of PG_arch_1 on individual pages Matthew Wilcox (Oracle)
2024-03-27 18:45 ` kernel test robot
2024-03-27 18:49 ` Matthew Wilcox
2024-03-26 17:10 ` [PATCH 02/10] xtensa: Remove uses " Matthew Wilcox (Oracle)
2024-03-28 19:36 ` Svetly Todorov
2024-03-28 19:40 ` Matthew Wilcox
2024-03-26 17:10 ` [PATCH 03/10] mm: Make page_ext_get() take a const argument Matthew Wilcox (Oracle)
2024-03-26 17:10 ` [PATCH 04/10] mm: Make folio_test_idle and folio_test_young " Matthew Wilcox (Oracle)
2024-03-26 17:10 ` [PATCH 05/10] mm: Make is_free_buddy_page() " Matthew Wilcox (Oracle)
2024-03-26 17:10 ` [PATCH 06/10] mm: Make page_mapped() " Matthew Wilcox (Oracle)
2024-03-26 17:10 ` [PATCH 07/10] mm: Convert arch_clear_hugepage_flags to take a folio Matthew Wilcox (Oracle)
2024-03-27 13:02 ` Ryan Roberts
2024-03-27 14:37 ` Matthew Wilcox
2024-03-27 15:48 ` kernel test robot
2024-03-27 17:01 ` kernel test robot
2024-03-26 17:10 ` [PATCH 08/10] slub: Remove use of page->flags Matthew Wilcox (Oracle)
2024-04-04 18:29 ` David Hildenbrand
2024-03-26 17:10 ` Matthew Wilcox (Oracle) [this message]
2024-03-26 17:10 ` [PATCH 10/10] proc: Rewrite stable_page_flags() 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=20240326171045.410737-10-willy@infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.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).