[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <64a43d16-606c-4255-8a8b-96d6e4e44729@linux.alibaba.com>
Date: Wed, 19 Mar 2025 17:09:06 +0800
From: Gao Xiang <hsiangkao@...ux.alibaba.com>
To: Christoph Hellwig <hch@....de>
Cc: akpm@...ux-foundation.org, bingbu.cao@...ux.intel.com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
lorenzo.stoakes@...cle.com, opensource.kernel@...o.com, rppt@...nel.org,
ryan.roberts@....com, urezki@...il.com, ziy@...dia.com,
vivek.kasireddy@...el.com, Huan Yang <link@...o.com>
Subject: Re: [PATCH] mm/vmalloc: fix mischeck pfn valid in vmap_pfns
On 2025/3/18 16:44, Christoph Hellwig wrote:
> 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..
>
>> 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
> willy as Mr. Folio while you're at it.
The minimum map unit is page size instead of variable-size folio.
For many cases, vmap (to combine many partial folios) is useful
(instead of split all folios to order-0 folios in advance) but
I agree page array may be inefficient.
So I don't think another folio vmap() version is better overall
anyway.
Thanks,
Gao Xiang
Powered by blists - more mailing lists