Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932565AbcLLVCO (ORCPT ); Mon, 12 Dec 2016 16:02:14 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36633 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932361AbcLLVCM (ORCPT ); Mon, 12 Dec 2016 16:02:12 -0500 Date: Tue, 13 Dec 2016 00:02:09 +0300 From: "Kirill A. Shutemov" To: "Aneesh Kumar K.V" Cc: akpm@linux-foundation.org, "Kirill A . Shutemov" , mpe@ellerman.id.au, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mm/thp/pagecache/collapse: Free the pte page table on collapse for thp page cache. Message-ID: <20161212210209.GC10202@node.shutemov.name> References: <20161212163428.6780-1-aneesh.kumar@linux.vnet.ibm.com> <20161212163428.6780-2-aneesh.kumar@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161212163428.6780-2-aneesh.kumar@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 835 Lines: 19 On Mon, Dec 12, 2016 at 10:04:28PM +0530, Aneesh Kumar K.V wrote: > With THP page cache, when trying to build a huge page from regular pte pages, > we just clear the pmd entry. We will take another fault and at that point we > will find the huge page in the radix tree, thereby using the huge page to > complete the page fault > > The second fault path will allocate the needed pgtable_t page for archs like > ppc64. So no need to deposit the same in collapse path. Depositing them in > the collapse path resulting in a pgtable_t memory leak also giving errors like > "[ 2362.021762] BUG: non-zero nr_ptes on freeing mm: 3" > > Fixes:"mm: THP page cache support for ppc64" > > Signed-off-by: Aneesh Kumar K.V Acked-by: Kirill A. Shutemov -- Kirill A. Shutemov