Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752491AbcCUEeL (ORCPT ); Mon, 21 Mar 2016 00:34:11 -0400 Received: from e17.ny.us.ibm.com ([129.33.205.207]:54401 "EHLO e17.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752296AbcCUEeC (ORCPT ); Mon, 21 Mar 2016 00:34:02 -0400 X-IBM-Helo: d01dlp01.pok.ibm.com X-IBM-MailFrom: aneesh.kumar@linux.vnet.ibm.com X-IBM-RcptTo: linux-fsdevel@vger.kernel.org;linux-kernel@vger.kernel.org From: "Aneesh Kumar K.V" To: "Kirill A. Shutemov" Cc: "Kirill A. Shutemov" , Hugh Dickins , Andrea Arcangeli , Andrew Morton , Dave Hansen , Vlastimil Babka , Christoph Lameter , Naoya Horiguchi , Jerome Marchand , Yang Shi , Sasha Levin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCHv4 08/25] thp: support file pages in zap_huge_pmd() In-Reply-To: <20160319010239.GB29883@node.shutemov.name> References: <1457737157-38573-1-git-send-email-kirill.shutemov@linux.intel.com> <1457737157-38573-9-git-send-email-kirill.shutemov@linux.intel.com> <87a8lvao4a.fsf@linux.vnet.ibm.com> <20160319010239.GB29883@node.shutemov.name> User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Mon, 21 Mar 2016 10:03:29 +0530 Message-ID: <87a8lsv49y.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16032104-0041-0000-0000-000003A69888 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1504 Lines: 35 "Kirill A. Shutemov" writes: > [ text/plain ] > On Fri, Mar 18, 2016 at 07:23:41PM +0530, Aneesh Kumar K.V wrote: >> "Kirill A. Shutemov" writes: >> >> > [ text/plain ] >> > split_huge_pmd() for file mappings (and DAX too) is implemented by just >> > clearing pmd entry as we can re-fill this area from page cache on pte >> > level later. >> > >> > This means we don't need deposit page tables when file THP is mapped. >> > Therefore we shouldn't try to withdraw a page table on zap_huge_pmd() >> > file THP PMD. >> >> Archs like ppc64 use deposited page table to track the hardware page >> table slot information. We probably may want to add hooks which arch can >> use to achieve the same even with file THP > > Could you describe more on what kind of information you're talking about? > Hardware page table in ppc64 requires us to map each subpage of the huge page. This is needed because at low level we use segment base page size to find the hash slot and on TLB miss, we use the faulting address and base page size (which is 64k even with THP) to find whether we have the page mapped in hash page table. Since we use base page size of 64K, we need to make sure that subpages are mapped (on demand) in hash page table. If we have then mapped we also need to track their hash table slot information so that we can clear it on invalidate of hugepage. With THP we used the deposited page table to store the hash slot information. -aneesh