Thread (23 messages) 23 messages, 5 authors, 2026-02-26

Re: [PATCH 2/5] mm: rmap: add a ZONE_DEVICE folio warning in folio_referenced()

From: Rik van Riel <riel@surriel.com>
Date: 2026-02-24 02:39:48
Also in: linux-mm, lkml

On Tue, 2026-02-24 at 09:56 +0800, Baolin Wang wrote:
quoted hunk ↗ jump to hunk
diff --git a/mm/rmap.c b/mm/rmap.c
index bff8f222004e..be785dfc9336 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1065,6 +1065,7 @@ int folio_referenced(struct folio *folio, int
is_locked,
 		.invalid_vma = invalid_folio_referenced_vma,
 	};
 
+	VM_WARN_ON_FOLIO(folio_is_zone_device(folio), folio);
 	*vm_flags = 0;
 	if (!pra.mapcount)
 		return 0;
Should be a VM_WARN_ON_ONCE_FOLIO so we do not cause
a softlockup if we try to print information about a
million ZONE_DEVICE pages?

-- 
All Rights Reversed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help