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, Ralph Campbell <rcampbell@nvidia.com>
Subject: [PATCH 5/9] mm: Remove stale example from comment
Date: Mon, 11 Dec 2023 16:22:10 +0000 [thread overview]
Message-ID: <20231211162214.2146080-6-willy@infradead.org> (raw)
In-Reply-To: <20231211162214.2146080-1-willy@infradead.org>
folio_add_new_anon_rmap() no longer works this way, so just remove the
entire example.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Ralph Campbell <rcampbell@nvidia.com>
---
mm/memremap.c | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/mm/memremap.c b/mm/memremap.c
index 9531faa92a7c..9e9fb1972fff 100644
--- a/mm/memremap.c
+++ b/mm/memremap.c
@@ -473,21 +473,11 @@ void free_zone_device_page(struct page *page)
__ClearPageAnonExclusive(page);
/*
- * When a device managed page is freed, the page->mapping field
+ * When a device managed page is freed, the folio->mapping field
* may still contain a (stale) mapping value. For example, the
- * lower bits of page->mapping may still identify the page as an
- * anonymous page. Ultimately, this entire field is just stale
- * and wrong, and it will cause errors if not cleared. One
- * example is:
- *
- * migrate_vma_pages()
- * migrate_vma_insert_page()
- * page_add_new_anon_rmap()
- * __page_set_anon_rmap()
- * ...checks page->mapping, via PageAnon(page) call,
- * and incorrectly concludes that the page is an
- * anonymous page. Therefore, it incorrectly,
- * silently fails to set up the new anon rmap.
+ * lower bits of folio->mapping may still identify the folio as an
+ * anonymous folio. Ultimately, this entire field is just stale
+ * and wrong, and it will cause errors if not cleared.
*
* For other types of ZONE_DEVICE pages, migration is either
* handled differently or not done at all, so there is no need
--
2.42.0
next prev parent reply other threads:[~2023-12-11 16:22 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-11 16:22 [PATCH 0/9] Finish two folio conversions Matthew Wilcox (Oracle)
2023-12-11 16:22 ` [PATCH 1/9] mm: Convert ksm_might_need_to_copy() to work on folios Matthew Wilcox (Oracle)
2023-12-12 12:32 ` David Hildenbrand
2023-12-12 12:43 ` Matthew Wilcox
2023-12-12 12:43 ` David Hildenbrand
2023-12-11 16:22 ` [PATCH 2/9] mm: Simplify the assertions in unuse_pte() Matthew Wilcox (Oracle)
2023-12-12 12:26 ` David Hildenbrand
2023-12-12 13:52 ` Matthew Wilcox
2023-12-12 13:55 ` David Hildenbrand
2023-12-11 16:22 ` [PATCH 3/9] mm: Convert unuse_pte() to use a folio throughout Matthew Wilcox (Oracle)
2023-12-11 16:22 ` [PATCH 4/9] mm: Remove some calls to page_add_new_anon_rmap() Matthew Wilcox (Oracle)
2023-12-12 13:20 ` David Hildenbrand
2023-12-11 16:22 ` Matthew Wilcox (Oracle) [this message]
2023-12-12 13:20 ` [PATCH 5/9] mm: Remove stale example from comment David Hildenbrand
2023-12-11 16:22 ` [PATCH 6/9] mm: Remove references to page_add_new_anon_rmap in comments Matthew Wilcox (Oracle)
2023-12-12 13:20 ` David Hildenbrand
2023-12-11 16:22 ` [PATCH 7/9] mm: Convert migrate_vma_insert_page() to use a folio Matthew Wilcox (Oracle)
2023-12-11 22:17 ` Alistair Popple
2023-12-12 13:21 ` David Hildenbrand
2023-12-11 16:22 ` [PATCH 8/9] mm: Convert collapse_huge_page() " Matthew Wilcox (Oracle)
2023-12-12 13:21 ` David Hildenbrand
2023-12-11 16:22 ` [PATCH 9/9] mm: Remove page_add_new_anon_rmap and lru_cache_add_inactive_or_unevictable Matthew Wilcox (Oracle)
2023-12-12 13:21 ` David Hildenbrand
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=20231211162214.2146080-6-willy@infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=rcampbell@nvidia.com \
/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