From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx110.postini.com [74.125.245.110]) by kanga.kvack.org (Postfix) with SMTP id 40C5B6B007E for ; Sat, 31 Mar 2012 08:09:31 -0400 (EDT) Received: by vcbfk14 with SMTP id fk14so1312504vcb.14 for ; Sat, 31 Mar 2012 05:09:30 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <201203301941.q2UJfo11007111@farm-0012.internal.tilera.com> References: <201203301941.q2UJfo11007111@farm-0012.internal.tilera.com> Date: Sat, 31 Mar 2012 20:09:29 +0800 Message-ID: Subject: Re: [PATCH] arch/tile: support multiple huge page sizes dynamically From: Hillf Danton Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Chris Metcalf Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Lucas De Marchi , Arnd Bergmann , Jiri Kosina , Joe Perches , KOSAKI Motohiro , "Paul E. McKenney" , Josh Triplett , Andrew Morton , Julia Lawall , Peter Zijlstra , Michal Hocko , KAMEZAWA Hiroyuki , Hugh Dickins Hello Chris On Sat, Mar 31, 2012 at 3:37 AM, Chris Metcalf wrote: > This change adds support for a new "super" bit in the tile PTE, and a > new arch_make_huge_pte() method called from make_huge_pte(). > The Tilera hypervisor sees the bit set at a given level of the page > table and gangs together 4, 16, or 64 consecutive pages from > that level of the hierarchy to create a larger TLB entry. > > One extra "super" page size can be specified at each of the > three levels of the page table hierarchy on tilegx, using the > "hugepagesz" argument on the boot command line. =C2=A0A new hypervisor > API is added to allow Linux to tell the hypervisor how many PTEs > to gang together at each level of the page table. > > To allow pre-allocating huge pages larger than the buddy allocator > can handle, this change modifies the Tilera bootmem support to > put all of memory on tilegx platforms into bootmem. > > As part of this change I eliminate the vestigial CONFIG_HIGHPTE > support, which never worked anyway, and eliminate the hv_page_size() > API in favor of the standard vma_kernel_pagesize() API. > > Signed-off-by: Chris Metcalf > --- [...] > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index a876871..4531be2 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -2123,6 +2123,9 @@ static pte_t make_huge_pte(struct vm_area_struct *v= ma, struct page *page, > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > =C2=A0 =C2=A0 =C2=A0 =C2=A0entry =3D pte_mkyoung(entry); > =C2=A0 =C2=A0 =C2=A0 =C2=A0entry =3D pte_mkhuge(entry); > +#ifdef arch_make_huge_pte > + =C2=A0 =C2=A0 =C2=A0 entry =3D arch_make_huge_pte(entry, vma, page, wri= table); > +#endif > Would you please make arch_make_huge_pte() the way that arch_prepare_hugepage() is implemented, or similar? > =C2=A0 =C2=A0 =C2=A0 =C2=A0return entry; > =C2=A0} > -- > 1.6.5.2 > -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org