From mboxrd@z Thu Jan 1 00:00:00 1970 From: Catalin Marinas Subject: Re: [PATCH 03/11] mm: hugetlb: Copy general hugetlb code from x86 to mm. Date: Fri, 24 May 2013 12:18:16 +0100 Message-ID: <20130524111816.GH18272@arm.com> References: <1369328878-11706-1-git-send-email-steve.capper@linaro.org> <1369328878-11706-4-git-send-email-steve.capper@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1369328878-11706-4-git-send-email-steve.capper@linaro.org> Sender: owner-linux-mm@kvack.org To: Steve Capper Cc: "linux-mm@kvack.org" , "x86@kernel.org" , "linux-arch@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Michal Hocko , Ken Chen , Mel Gorman , Will Deacon , "patches@linaro.org" List-Id: linux-arch.vger.kernel.org On Thu, May 23, 2013 at 06:07:50PM +0100, Steve Capper wrote: > The huge_pte_alloc, huge_pte_offset and follow_huge_p[mu]d > functions in x86/mm/hugetlbpage.c do not rely on any architecture > specific knowledge other than the fact that pmds and puds can be > treated as huge ptes. > > To allow other architectures to use this code (and reduce the need > for code duplication), this patch copies these functions into mm, > replaces the use of pud_large with pud_huge and provides a config > flag to activate them: > CONFIG_ARCH_WANT_GENERAL_HUGETLB BTW, I think it's worth mentioning that pud_large is inline while pud_huge is not. -- Catalin -- 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 fw-tnat.cambridge.arm.com ([217.140.96.21]:58598 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751633Ab3EXLTB (ORCPT ); Fri, 24 May 2013 07:19:01 -0400 Date: Fri, 24 May 2013 12:18:16 +0100 From: Catalin Marinas Subject: Re: [PATCH 03/11] mm: hugetlb: Copy general hugetlb code from x86 to mm. Message-ID: <20130524111816.GH18272@arm.com> References: <1369328878-11706-1-git-send-email-steve.capper@linaro.org> <1369328878-11706-4-git-send-email-steve.capper@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1369328878-11706-4-git-send-email-steve.capper@linaro.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Steve Capper Cc: "linux-mm@kvack.org" , "x86@kernel.org" , "linux-arch@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Michal Hocko , Ken Chen , Mel Gorman , Will Deacon , "patches@linaro.org" Message-ID: <20130524111816.INA2PJ8qeGvjqu7oYXFpCXGbFzhqOR-BraZdlCELm30@z> On Thu, May 23, 2013 at 06:07:50PM +0100, Steve Capper wrote: > The huge_pte_alloc, huge_pte_offset and follow_huge_p[mu]d > functions in x86/mm/hugetlbpage.c do not rely on any architecture > specific knowledge other than the fact that pmds and puds can be > treated as huge ptes. > > To allow other architectures to use this code (and reduce the need > for code duplication), this patch copies these functions into mm, > replaces the use of pud_large with pud_huge and provides a config > flag to activate them: > CONFIG_ARCH_WANT_GENERAL_HUGETLB BTW, I think it's worth mentioning that pud_large is inline while pud_huge is not. -- Catalin From mboxrd@z Thu Jan 1 00:00:00 1970 From: catalin.marinas@arm.com (Catalin Marinas) Date: Fri, 24 May 2013 12:18:16 +0100 Subject: [PATCH 03/11] mm: hugetlb: Copy general hugetlb code from x86 to mm. In-Reply-To: <1369328878-11706-4-git-send-email-steve.capper@linaro.org> References: <1369328878-11706-1-git-send-email-steve.capper@linaro.org> <1369328878-11706-4-git-send-email-steve.capper@linaro.org> Message-ID: <20130524111816.GH18272@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, May 23, 2013 at 06:07:50PM +0100, Steve Capper wrote: > The huge_pte_alloc, huge_pte_offset and follow_huge_p[mu]d > functions in x86/mm/hugetlbpage.c do not rely on any architecture > specific knowledge other than the fact that pmds and puds can be > treated as huge ptes. > > To allow other architectures to use this code (and reduce the need > for code duplication), this patch copies these functions into mm, > replaces the use of pud_large with pud_huge and provides a config > flag to activate them: > CONFIG_ARCH_WANT_GENERAL_HUGETLB BTW, I think it's worth mentioning that pud_large is inline while pud_huge is not. -- Catalin