From: Francois Dugast <francois.dugast@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org,
Matthew Brost <matthew.brost@intel.com>,
Balbir Singh <balbirs@nvidia.com>,
Alistair Popple <apopple@nvidia.com>, Zi Yan <ziy@nvidia.com>,
David Hildenbrand <david@kernel.org>,
Oscar Salvador <osalvador@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-cxl@vger.kernel.org,
linux-kernel@vger.kernel.org,
Francois Dugast <francois.dugast@intel.com>
Subject: [PATCH v3 3/7] mm: Split device-private and coherent folios before freeing
Date: Fri, 9 Jan 2026 09:54:23 +0100 [thread overview]
Message-ID: <20260109085605.443316-4-francois.dugast@intel.com> (raw)
In-Reply-To: <20260109085605.443316-1-francois.dugast@intel.com>
From: Matthew Brost <matthew.brost@intel.com>
Split device-private and coherent folios into individual pages before
freeing so that any order folio can be formed upon the next use of the
pages.
Cc: Balbir Singh <balbirs@nvidia.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Zi Yan <ziy@nvidia.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Cc: linux-cxl@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
---
mm/memremap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/memremap.c b/mm/memremap.c
index 63c6ab4fdf08..7289cdd6862f 100644
--- a/mm/memremap.c
+++ b/mm/memremap.c
@@ -453,6 +453,8 @@ void free_zone_device_folio(struct folio *folio)
case MEMORY_DEVICE_COHERENT:
if (WARN_ON_ONCE(!pgmap->ops || !pgmap->ops->folio_free))
break;
+
+ folio_split_unref(folio);
pgmap->ops->folio_free(folio);
percpu_ref_put_many(&folio->pgmap->ref, nr);
break;
--
2.43.0
next prev parent reply other threads:[~2026-01-09 8:56 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260109085605.443316-1-francois.dugast@intel.com>
2026-01-09 8:54 ` [PATCH v3 1/7] mm: Add folio_split_unref helper Francois Dugast
2026-01-09 13:19 ` David Hildenbrand (Red Hat)
2026-01-09 13:26 ` David Hildenbrand (Red Hat)
2026-01-09 14:30 ` Zi Yan
2026-01-09 15:11 ` David Hildenbrand (Red Hat)
2026-01-09 18:38 ` Matthew Brost
2026-01-09 18:37 ` Andrew Morton
2026-01-09 18:41 ` Zi Yan
2026-01-09 18:54 ` Francois Dugast
2026-01-09 18:43 ` Matthew Brost
2026-01-09 19:22 ` Andrew Morton
2026-01-09 19:26 ` Liam R. Howlett
2026-01-09 8:54 ` Francois Dugast [this message]
2026-01-09 11:09 ` [PATCH v3 3/7] mm: Split device-private and coherent folios before freeing Mika Penttilä
2026-01-09 17:28 ` Zi Yan
2026-01-09 18:26 ` Matthew Brost
2026-01-09 18:53 ` Zi Yan
2026-01-09 19:08 ` Matthew Brost
2026-01-09 19:23 ` Zi Yan
2026-01-09 20:03 ` Matthew Brost
2026-01-09 20:15 ` Zi Yan
2026-01-09 21:34 ` Balbir Singh
2026-01-09 21:43 ` Zi Yan
2026-01-09 22:11 ` Balbir Singh
2026-01-09 22:14 ` Zi Yan
2026-01-09 22:36 ` Balbir Singh
2026-01-09 23:15 ` Matthew Brost
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=20260109085605.443316-4-francois.dugast@intel.com \
--to=francois.dugast@intel.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=balbirs@nvidia.com \
--cc=david@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=matthew.brost@intel.com \
--cc=osalvador@suse.de \
--cc=ziy@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