[You don't often get email from hch@xxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]OK, I learn it more.
On Tue, Mar 18, 2025 at 04:20:17PM +0800, Huan Yang wrote:
This prevents us from properly invoking vmap, which is why we have turned to using vmap_pfn instead.No, vmap_pfn is entirely for memory not backed by pages or folios,
Even if a folio-based vmap is implemented, it still cannot handle mapping multiple folio ranges of physical
memory to vmalloc regions. A range of folio is important, it maybe an offset in memfd, no need entire folio.
So, I still consider vmap_pfn to be the optimal solution for this specific scenario. :)
i.e. PCIe BARs and similar memory. This must not be mixed with proper
folio backed memory.
May can't
So you'll need a vmap for folios to support this use case.
And a fully folios based vmap solves that problem.historically backed by pages and now folios.So by HVO, it also not backed by pages, only contains folio head, each tail pfn's page struct go away.