linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: David Hildenbrand <david@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org
Subject: Re: [PATCH 2/9] mm: Simplify the assertions in unuse_pte()
Date: Tue, 12 Dec 2023 13:52:59 +0000	[thread overview]
Message-ID: <ZXhlu6eB2TQViN+V@casper.infradead.org> (raw)
In-Reply-To: <02d6d72a-334c-40c0-8490-b941d798d2dc@redhat.com>

On Tue, Dec 12, 2023 at 01:26:35PM +0100, David Hildenbrand wrote:
> On 11.12.23 17:22, Matthew Wilcox (Oracle) wrote:
> > We should only see anon folios in this function (and there are many
> > assumptions of that already), so we can simplify these two assertions.
> 
> If we swapped in a fresh page, it is not PageAnon before we do the
> page_add_anon_rmap() call.
> 
> So I'm pretty sure this is wrong.

Argh, yes.

What do you think to just dropping the assertions altogether?  You
added them in 78fbe906cc90 as part of general paranoia about using
an existing flag for a new purpose.  I think they've now served their
purpose and can go away.

Perhaps simply:

	VM_BUG_ON_PAGE(PageAnonExclusive(page), page);


  reply	other threads:[~2023-12-12 13:53 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 [this message]
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 ` [PATCH 5/9] mm: Remove stale example from comment Matthew Wilcox (Oracle)
2023-12-12 13:20   ` 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=ZXhlu6eB2TQViN+V@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --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