* + remove-references-to-page-flags-in-documentation.patch added to mm-unstable branch
@ 2024-03-26 18:30 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-03-26 18:30 UTC (permalink / raw)
To: mm-commits, willy, akpm
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 6804 bytes --]
The patch titled
Subject: remove references to page->flags in documentation
has been added to the -mm mm-unstable branch. Its filename is
remove-references-to-page-flags-in-documentation.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/remove-references-to-page-flags-in-documentation.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: remove references to page->flags in documentation
Date: Tue, 26 Mar 2024 17:10:31 +0000
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.
Link: https://lkml.kernel.org/r/20240326171045.410737-10-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Documentation/admin-guide/cgroup-v1/memory.rst | 4 -
Documentation/mm/vmemmap_dedup.rst | 22 ----------
Documentation/translations/zh_CN/core-api/cachetlb.rst | 2
mm/migrate.c | 2
mm/rmap.c | 4 -
5 files changed, 7 insertions(+), 27 deletions(-)
--- a/Documentation/admin-guide/cgroup-v1/memory.rst~remove-references-to-page-flags-in-documentation
+++ a/Documentation/admin-guide/cgroup-v1/memory.rst
@@ -300,14 +300,14 @@ When oom event notifier is registered, e
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:
--- a/Documentation/mm/vmemmap_dedup.rst~remove-references-to-page-flags-in-documentation
+++ a/Documentation/mm/vmemmap_dedup.rst
@@ -180,27 +180,7 @@ this correctly. There is only **one** he
``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
==========
--- a/Documentation/translations/zh_CN/core-api/cachetlb.rst~remove-references-to-page-flags-in-documentation
+++ a/Documentation/translations/zh_CN/core-api/cachetlb.rst
@@ -260,7 +260,7 @@ é®é¢æå¯è½åå¨ï¼å 为å
æ ¸å·²ç
妿D-cacheå«å䏿¯ä¸ä¸ªé®é¢ï¼è¿ä¸ªç¨åºå¯ä»¥ç®åå°å®ä¹ä¸ºè¯¥æ¶æä¸
çnopã
- å¨page->flags (PG_arch_1)䏿ä¸ä¸ªä½æ¯âæ¶æç§æâãå
æ ¸ä¿è¯ï¼
+ å¨folio->flags (PG_arch_1)䏿ä¸ä¸ªä½æ¯âæ¶æç§æâãå
æ ¸ä¿è¯ï¼
对äºå页ç¼åç页é¢ï¼å½è¿æ ·ç页é¢ç¬¬ä¸æ¬¡è¿å
¥å页ç¼åæ¶ï¼å®å°æ¸
é¤
è¿ä¸ªä½ã
--- a/mm/migrate.c~remove-references-to-page-flags-in-documentation
+++ a/mm/migrate.c
@@ -113,7 +113,7 @@ bool isolate_movable_page(struct page *p
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);
--- a/mm/rmap.c~remove-references-to-page-flags-in-documentation
+++ a/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>
_
Patches currently in -mm which might be from willy@infradead.org are
mm-always-initialise-folio-_deferred_list.patch
mm-create-folio_flag_false-and-folio_type_ops-macros.patch
mm-remove-folio_prep_large_rmappable.patch
mm-support-page_mapcount-on-page_has_type-pages.patch
mm-turn-folio_test_hugetlb-into-a-pagetype.patch
mm-turn-folio_test_hugetlb-into-a-pagetype-fix.patch
mm-remove-a-call-to-compound_head-from-is_page_hwpoison.patch
mm-free-up-pg_slab.patch
mm-free-up-pg_slab-fix.patch
mm-improve-dumping-of-mapcount-and-page_type.patch
hugetlb-remove-mention-of-destructors.patch
sh-remove-use-of-pg_arch_1-on-individual-pages.patch
xtensa-remove-uses-of-pg_arch_1-on-individual-pages.patch
mm-make-page_ext_get-take-a-const-argument.patch
mm-make-folio_test_idle-and-folio_test_young-take-a-const-argument.patch
mm-make-is_free_buddy_page-take-a-const-argument.patch
mm-make-page_mapped-take-a-const-argument.patch
mm-convert-arch_clear_hugepage_flags-to-take-a-folio.patch
slub-remove-use-of-page-flags.patch
remove-references-to-page-flags-in-documentation.patch
proc-rewrite-stable_page_flags.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-26 18:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-26 18:30 + remove-references-to-page-flags-in-documentation.patch added to mm-unstable branch 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.