]> bbs.cooldavid.org Git - net-next-2.6.git/commit - mm/hugetlb.c
[PATCH] Hugepage consolidation
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 22 Jun 2005 00:14:44 +0000 (17:14 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 22 Jun 2005 01:46:15 +0000 (18:46 -0700)
commit63551ae0feaaa23807ebea60de1901564bbef32e
treef6f97f60f83c3e9813bdfcc6039c499997b1ea10
parent1e7e5a9048b30c57ba1ddaa6cdf59b21b65cde99
[PATCH] Hugepage consolidation

A lot of the code in arch/*/mm/hugetlbpage.c is quite similar.  This patch
attempts to consolidate a lot of the code across the arch's, putting the
combined version in mm/hugetlb.c.  There are a couple of uglyish hacks in
order to covert all the hugepage archs, but the result is a very large
reduction in the total amount of code.  It also means things like hugepage
lazy allocation could be implemented in one place, instead of six.

Tested, at least a little, on ppc64, i386 and x86_64.

Notes:
- this patch changes the meaning of set_huge_pte() to be more
  analagous to set_pte()
- does SH4 need s special huge_ptep_get_and_clear()??

Acked-by: William Lee Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 files changed:
arch/i386/mm/hugetlbpage.c
arch/ia64/mm/hugetlbpage.c
arch/ppc64/mm/hugetlbpage.c
arch/sh/mm/hugetlbpage.c
arch/sh64/mm/hugetlbpage.c
arch/sparc64/mm/hugetlbpage.c
include/asm-i386/page.h
include/asm-i386/pgtable.h
include/asm-ia64/pgtable.h
include/asm-sh/page.h
include/asm-sh/pgtable.h
include/asm-sh64/page.h
include/asm-sh64/pgtable.h
include/asm-sparc64/page.h
include/asm-sparc64/pgtable.h
include/asm-x86_64/page.h
include/asm-x86_64/pgtable.h
include/linux/hugetlb.h
mm/hugetlb.c