From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Aneesh Kumar K.V" Subject: Re: [PATCH 3/8] sparc64: Eliminate PTE table memory wastage. Date: Thu, 04 Oct 2012 22:00:48 +0530 Message-ID: <87y5jmfbd3.fsf@linux.vnet.ibm.com> References: <20121002.182642.49574627747120711.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20121002.182642.49574627747120711.davem@davemloft.net> Sender: owner-linux-mm@kvack.org To: David Miller , linux-mm@kvack.org Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, akpm@linux-foundation.org, aarcange@redhat.com, hannes@cmpxchg.org List-Id: linux-arch.vger.kernel.org David Miller writes: > We've split up the PTE tables so that they take up half a page instead > of a full page. This is in order to facilitate transparent huge page > support, which works much better if our PMDs cover 4MB instead of 8MB. > > What we do is have a one-behind cache for PTE table allocations in the > mm struct. > > This logic triggers only on allocations. For example, we don't try to > keep track of free'd up page table blocks in the style that the s390 > port does. I am also implementing a similar change for powerpc. We have a 64K page size, and want to make sure PMD cover 16MB, which is the huge page size supported by the hardware. I was looking at using the s390 logic, considering we have 16 PMDs mapping to same PTE page. Should we look at generalizing the case so that other architectures can start using the same code ? -aneesh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp08.au.ibm.com ([202.81.31.141]:46038 "EHLO e23smtp08.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933434Ab2JDQbG (ORCPT ); Thu, 4 Oct 2012 12:31:06 -0400 Received: from /spool/local by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 5 Oct 2012 02:30:24 +1000 From: "Aneesh Kumar K.V" Subject: Re: [PATCH 3/8] sparc64: Eliminate PTE table memory wastage. In-Reply-To: <20121002.182642.49574627747120711.davem@davemloft.net> References: <20121002.182642.49574627747120711.davem@davemloft.net> Date: Thu, 04 Oct 2012 22:00:48 +0530 Message-ID: <87y5jmfbd3.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-arch-owner@vger.kernel.org List-ID: To: David Miller , linux-mm@kvack.org Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, akpm@linux-foundation.org, aarcange@redhat.com, hannes@cmpxchg.org Message-ID: <20121004163048.axDcgeW9RusOtw1hst1H_zDM_z7UXB3eYtKc96MU7ZY@z> David Miller writes: > We've split up the PTE tables so that they take up half a page instead > of a full page. This is in order to facilitate transparent huge page > support, which works much better if our PMDs cover 4MB instead of 8MB. > > What we do is have a one-behind cache for PTE table allocations in the > mm struct. > > This logic triggers only on allocations. For example, we don't try to > keep track of free'd up page table blocks in the style that the s390 > port does. I am also implementing a similar change for powerpc. We have a 64K page size, and want to make sure PMD cover 16MB, which is the huge page size supported by the hardware. I was looking at using the s390 logic, considering we have 16 PMDs mapping to same PTE page. Should we look at generalizing the case so that other architectures can start using the same code ? -aneesh