[PATCH kernel] powerpc/iommu: Do not call PageTransHuge() on tail pages

Balbir Singh bsingharora at gmail.com
Mon Apr 3 13:27:52 AEST 2017


On Tue, 2017-03-28 at 16:25 +1100, Alexey Kardashevskiy wrote:
> The CMA pages migration code does not support compound pages at
> the moment so it performs few tests before proceeding to actual page
> migration.
> 
> One of the tests - PageTransHuge() - has VM_BUG_ON_PAGE(PageTail()) as
> it should be called on head pages. Since we also test for PageCompound(),
> and it contains PageTail(), we can simply move PageCompound() in front
> of PageTransHuge() and therefore avoid possible VM_BUG_ON_PAGE.
> 
> Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>
> ---

The fix looks reasonable to me. I suspect the checks can be simplified
and we can support split and move of THP in the future.

For now, looks good

Acked-by: Balbir Singh <bsingharora at gmail.com>




More information about the Linuxppc-dev mailing list