From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vxHcH54llzDqHJ for ; Mon, 3 Apr 2017 13:27:59 +1000 (AEST) Received: by mail-pg0-x242.google.com with SMTP id 81so26751235pgh.3 for ; Sun, 02 Apr 2017 20:27:58 -0700 (PDT) Message-ID: <1491190072.8948.1.camel@gmail.com> Subject: Re: [PATCH kernel] powerpc/iommu: Do not call PageTransHuge() on tail pages From: Balbir Singh To: Alexey Kardashevskiy , linuxppc-dev@lists.ozlabs.org Cc: Paul Mackerras , "Aneesh Kumar K . V" , Greg Kurz Date: Mon, 03 Apr 2017 13:27:52 +1000 In-Reply-To: <20170328052559.12912-1-aik@ozlabs.ru> References: <20170328052559.12912-1-aik@ozlabs.ru> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 > --- 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