[PATCH v2 2/2] KVM: arm64: Use folio for THP adjustment

Gavin Shan gshan at redhat.com
Fri Sep 29 16:52:21 PDT 2023


Hi Matthew,

On 9/29/23 23:07, Matthew Wilcox wrote:
> On Fri, Sep 29, 2023 at 05:24:00PM +1000, Gavin Shan wrote:
>>> +		size_t sz = folio_size(pfn_folio(pfn));
>>
>> Is it possible that a tail page is returned from __gfn_to_pfn_memslot()? folio_size()
>> doesn't work for a tail page because order 0 is returned for tail pages. It seems it's
> 
> pfn_folio() can't return a tail page.  That's the point of folios; they
> aren't tail pages.  They're either a head page or an order-0 page.
> 

Indeed, page_folio() already returned the head page properly.
Thanks a lot for your confirm.

Thanks,
Gavin




More information about the linux-arm-kernel mailing list