All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-util-introduce-snapshot_page-fix.patch added to mm-new branch
@ 2025-07-09  3:04 Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2025-07-09  3:04 UTC (permalink / raw)
  To: mm-commits, willy, sj, shivankg, osalvador, david, luizcap, akpm


The patch titled
     Subject: mm-util-introduce-snapshot_page-fix
has been added to the -mm mm-new branch.  Its filename is
     mm-util-introduce-snapshot_page-fix.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-util-introduce-snapshot_page-fix.patch

This patch will later appear in the mm-new branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews.  Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.

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: Luiz Capitulino <luizcap@redhat.com>
Subject: mm-util-introduce-snapshot_page-fix
Date: Tue, 8 Jul 2025 12:59:07 -0400

use clear_compound_head(), per Shivank

Link: https://lkml.kernel.org/r/60a1a526-52dd-478a-9ed4-79e6428743ac@redhat.com
Signed-off-by: Luiz Capitulino <luizcap@redhat.com>
Cc: Shivank Garg <shivankg@amd.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/util.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/util.c~mm-util-introduce-snapshot_page-fix
+++ a/mm/util.c
@@ -1239,7 +1239,7 @@ again:
 	if (ps->idx > nr_pages) {
 		if (loops-- > 0)
 			goto again;
-		ps->page_snapshot.compound_head &= ~1UL;
+		clear_compound_head(&ps->page_snapshot);
 		foliop = (struct folio *)&ps->page_snapshot;
 		ps->flags = 0;
 		ps->idx = 0;
_

Patches currently in -mm which might be from luizcap@redhat.com are

mm-util-introduce-snapshot_page.patch
mm-util-introduce-snapshot_page-fix.patch
proc-kpagecount-use-snapshot_page.patch
fs-stable_page_flags-use-snapshot_page.patch


^ permalink raw reply	[flat|nested] 2+ messages in thread

* + mm-util-introduce-snapshot_page-fix.patch added to mm-new branch
@ 2025-07-17 21:55 Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2025-07-17 21:55 UTC (permalink / raw)
  To: mm-commits, willy, sj, shivankg, osalvador, harry.yoo, david,
	luizcap, akpm


The patch titled
     Subject: mm-util-introduce-snapshot_page-fix
has been added to the -mm mm-new branch.  Its filename is
     mm-util-introduce-snapshot_page-fix.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-util-introduce-snapshot_page-fix.patch

This patch will later appear in the mm-new branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews.  Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.

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: Luiz Capitulino <luizcap@redhat.com>
Subject: mm-util-introduce-snapshot_page-fix
Date: Thu, 17 Jul 2025 11:54:07 -0400

fix set_ps_flags() commentary

Link: https://lkml.kernel.org/r/d5c75701-b353-4536-a306-187fab0655b3@redhat.com
Signed-off-by: Luiz Capitulino <luizcap@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Harry Yoo <harry.yoo@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: SeongJae Park <sj@kernel.org>
Cc: Shivank Garg <shivankg@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/util.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

--- a/mm/util.c~mm-util-introduce-snapshot_page-fix
+++ a/mm/util.c
@@ -1198,10 +1198,12 @@ static void set_ps_flags(struct page_sna
  * Create a snapshot of the page and store both its struct page and struct
  * folio representations in @ps.
  *
- * Note that creating a faithful snapshot may fail if the compound
- * state of the page keeps changing (e.g., due to a folio split). In
- * this case, ps->faithful is set to false, and the snapshot assumes
- * that @page refers to a single page.
+ * A snapshot is marked as "faithful" if the compound state of @page was
+ * stable and allowed safe reconstruction of the folio representation. In
+ * rare cases where this is not possible (e.g. due to folio splitting),
+ * snapshot_page() falls back to treating @page as a single page and the
+ * snapshot is marked as "unfaithful". The snapshot_page_is_faithful()
+ * helper can be used to check for this condition.
  */
 void snapshot_page(struct page_snapshot *ps, const struct page *page)
 {
_

Patches currently in -mm which might be from luizcap@redhat.com are

mm-util-introduce-snapshot_page.patch
mm-util-introduce-snapshot_page-fix.patch
proc-kpagecount-use-snapshot_page.patch
fs-stable_page_flags-use-snapshot_page.patch


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-17 21:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-09  3:04 + mm-util-introduce-snapshot_page-fix.patch added to mm-new branch Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2025-07-17 21:55 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.