HI Christoph
在 2025/3/18 16:44, Christoph Hellwig 写道:
[You don't often get email from hch@xxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
On Tue, Mar 18, 2025 at 04:39:40PM +0800, Huan Yang wrote:
A folio may be 2MB or more large 1GB, what if we only need a little, 1M or 512MB, can vmap based on folio can solve it?
Then you only map part of it by passing a length argument. Note that
in general when you have these large folios you also don't have highmem,
so if you only map one of them, or part of one of them you don't actually
need vmap at all and can just use folio-address..
The situation remains complex. We are not only referring to this single folio, but it may be composed
of multiple folios and start with a small piece. For example:
Folio 1 2M - use 1M
Folio 2 2M - use 2M
....
Combine these folios into memory used by udmabuf. So, directly virtual memory useless. :)
Normally, can offer 4k-page based array map it. But consider HVO, can't. That's why wanto base on pfn.
Well, for any large folio using this 4k based page interface is
actually highly inefficient. So let's fix that. And my loop in
Yes, indeed. You mentioned good to entire folio array mapped into vmalloc, I guest here are many user like it.
willy as Mr. Folio while you're at it.
I'd like to research it, but not too fast. :)