Re: [PATCH] mm/vmalloc: fix mischeck pfn valid in vmap_pfns
From: Huan Yang
Date: Tue Mar 18 2025 - 04:21:46 EST
HI Christoph
在 2025/3/18 14:48, Christoph Hellwig 写道:
So you want a folio based version of vmap. Please work on that instead
The folio-based vmap implementation you mentioned may indeed be necessary, but it has limited
direct relevance to the specific issue I'm currently addressing.
of doing crazy hacks using vmap_pfns which is just for memory not
I mentioned that if we use HVO-based hugetlb, we cannot access the page structures corresponding to
the physical memory that needs to be mapped.
This prevents us from properly invoking vmap, which is why we have turned to using vmap_pfn instead.
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. :)
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.
Do I misunderstood this part? Please correct me.
Thank you
Huan Yang