From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755401AbcBPPcG (ORCPT ); Tue, 16 Feb 2016 10:32:06 -0500 Received: from mga02.intel.com ([134.134.136.20]:11070 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755320AbcBPPcA (ORCPT ); Tue, 16 Feb 2016 10:32:00 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,455,1449561600"; d="scan'208";a="48756484" Subject: Re: [PATCHv2 13/28] thp: support file pages in zap_huge_pmd() To: "Kirill A. Shutemov" References: <1455200516-132137-1-git-send-email-kirill.shutemov@linux.intel.com> <1455200516-132137-14-git-send-email-kirill.shutemov@linux.intel.com> <56BE2581.6070901@intel.com> <20160216100023.GC46557@black.fi.intel.com> Cc: Hugh Dickins , Andrea Arcangeli , Andrew Morton , Vlastimil Babka , Christoph Lameter , Naoya Horiguchi , Jerome Marchand , Yang Shi , Sasha Levin , linux-kernel@vger.kernel.org, linux-mm@kvack.org From: Dave Hansen Message-ID: <56C340EE.1060506@intel.com> Date: Tue, 16 Feb 2016 07:31:58 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160216100023.GC46557@black.fi.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/16/2016 02:00 AM, Kirill A. Shutemov wrote: > On Fri, Feb 12, 2016 at 10:33:37AM -0800, Dave Hansen wrote: >> On 02/11/2016 06:21 AM, Kirill A. Shutemov wrote: >>> For file pages we don't deposit page table on mapping: no need to >>> withdraw it. >> >> I thought the deposit thing was to guarantee we could always do a PMD >> split. It still seems like if you wanted to split a huge-tmpfs page, >> you'd need to first split the PMD which might need the deposited one. >> >> Why not? > > For file thp, split_huge_pmd() is implemented by clearing out the pmd: we > can setup and fill pte table later. Therefore no need to deposit page > table -- we would not use it. DAX does the same. Ahh... Do we just never split in any fault contexts, or do we just retry the fault? In any case, that seems like fine enough (although subtle) behavior. Can you call it out a bit more explicitly in the patch text?