Re: [PATCH kernel] powerpc/iommu: Do not call PageTransHuge() on tail pages
From: Balbir Singh <bsingharora@gmail.com>
Date: 2017-04-03 03:27:59
From: Balbir Singh <bsingharora@gmail.com>
Date: 2017-04-03 03:27:59
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 <redacted> ---
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@gmail.com>