linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>, linux-mm@kvack.org
Subject: Re: [RFC PATCH 2/3] mm: Create snapshot_page()
Date: Thu, 17 Apr 2025 15:52:21 +0200	[thread overview]
Message-ID: <0b502748-3f37-4fbf-9709-afc47db17dce@redhat.com> (raw)
In-Reply-To: <d7d22fd9-f8de-4f0a-917f-492bf6f9ba07@redhat.com>

> A better interface might be something like:
> 
> struct page_snapshot {
> 	struct folio folio_snapshot;
> 	struct page page_snapshot;
> 	/* page_to_pfn(page_snapshot) etc. don't work. */
> 	unsigned long pfn;
> 	/* folio_page_idx(folio_snapshot, ...) etc. don't work. */
> 	unsigned long idx;
> };
> 
> void snapshot_page(struct page_snapshot *ps, struct page *page);
> 
> Or even (likely performance is less relevant)
> 
> struct page_snapshot snapshot_page(struct page *page);
> 
> 
> __dump_folio() would then only accept that structure.
> 
> 
> In the future, we could indicate what kind of memdesc the page was a
> part of, and have "struct folio folio_snapshot;" be in a union with
> other types we support to snapshot etc..

Hi Willy,

either I or somebody from our team might have time to look into that.

Are you planning on following up on this here soon, or would it help you 
if we take care of this?

-- 
Cheers,

David / dhildenb



  reply	other threads:[~2025-04-17 13:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10 21:21 [RFC PATCH 0/3] snapshot_page() Matthew Wilcox (Oracle)
2025-02-10 21:21 ` [RFC PATCH 1/3] mm: Constify folio_mapping() and swapcache_mapping() Matthew Wilcox (Oracle)
2025-02-11 20:04   ` David Hildenbrand
2025-02-12  8:56   ` Shivank Garg
2025-02-10 21:21 ` [RFC PATCH 2/3] mm: Create snapshot_page() Matthew Wilcox (Oracle)
2025-02-12  8:54   ` Shivank Garg
2025-02-14 21:18   ` David Hildenbrand
2025-04-17 13:52     ` David Hildenbrand [this message]
2025-02-10 21:21 ` [RFC PATCH 3/3] proc: Use snapshot_page() in kpageflags Matthew Wilcox (Oracle)
2025-02-11 21:17   ` Zi Yan
2025-02-12  8:57   ` Shivank Garg

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=0b502748-3f37-4fbf-9709-afc47db17dce@redhat.com \
    --to=david@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.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