From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables Date: Wed, 20 Feb 2019 13:03:15 -0800 Message-ID: <20190220210315.GM12668@bombadil.infradead.org> References: <20190214211642.2200-1-yuzhao@google.com> <20190218231319.178224-1-yuzhao@google.com> <863acc9a-53fb-86ad-4521-828ee8d9c222@arm.com> <20190219053205.GA124985@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20190219053205.GA124985@google.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Yu Zhao Cc: Mark Rutland , linux-arch@vger.kernel.org, Anshuman Khandual , Peter Zijlstra , Catalin Marinas , Ard Biesheuvel , Will Deacon , linux-kernel@vger.kernel.org, Nick Piggin , Jun Yao , linux-mm@kvack.org, "Aneesh Kumar K . V" , Chintan Pandya , Joel Fernandes , "Kirill A . Shutemov" , Andrew Morton , Laura Abbott , linux-arm-kernel@lists.infradead.org List-Id: linux-arch.vger.kernel.org On Mon, Feb 18, 2019 at 10:32:05PM -0700, Yu Zhao wrote: > pgtable_pmd_page_ctor() must be used on user pmd. For kernel pmd, > it's okay to use pgtable_page_ctor() instead only because kernel > doesn't have thp. I'm not sure that's true. I think you can create THPs in vmalloc these days. See HAVE_ARCH_HUGE_VMAP which is supported by arm64. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:59650 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725881AbfBTVDX (ORCPT ); Wed, 20 Feb 2019 16:03:23 -0500 Date: Wed, 20 Feb 2019 13:03:15 -0800 From: Matthew Wilcox Subject: Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables Message-ID: <20190220210315.GM12668@bombadil.infradead.org> References: <20190214211642.2200-1-yuzhao@google.com> <20190218231319.178224-1-yuzhao@google.com> <863acc9a-53fb-86ad-4521-828ee8d9c222@arm.com> <20190219053205.GA124985@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190219053205.GA124985@google.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Yu Zhao Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , "Aneesh Kumar K . V" , Andrew Morton , Nick Piggin , Peter Zijlstra , Joel Fernandes , "Kirill A . Shutemov" , Mark Rutland , Ard Biesheuvel , Chintan Pandya , Jun Yao , Laura Abbott , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Message-ID: <20190220210315.n1NJYpCFB-1Q4d0vtZ9WI_xM0eQgsFK3gL4fSKHTokA@z> On Mon, Feb 18, 2019 at 10:32:05PM -0700, Yu Zhao wrote: > pgtable_pmd_page_ctor() must be used on user pmd. For kernel pmd, > it's okay to use pgtable_page_ctor() instead only because kernel > doesn't have thp. I'm not sure that's true. I think you can create THPs in vmalloc these days. See HAVE_ARCH_HUGE_VMAP which is supported by arm64.