[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>
Showing
- arch/i386/mm/hugetlbpage.c 8 additions, 162 deletionsarch/i386/mm/hugetlbpage.c
- arch/ia64/mm/hugetlbpage.c 2 additions, 156 deletionsarch/ia64/mm/hugetlbpage.c
- arch/ppc64/mm/hugetlbpage.c 2 additions, 178 deletionsarch/ppc64/mm/hugetlbpage.c
- arch/sh/mm/hugetlbpage.c 24 additions, 172 deletionsarch/sh/mm/hugetlbpage.c
- arch/sh64/mm/hugetlbpage.c 16 additions, 2 deletionsarch/sh64/mm/hugetlbpage.c
- arch/sparc64/mm/hugetlbpage.c 24 additions, 171 deletionsarch/sparc64/mm/hugetlbpage.c
- include/asm-i386/page.h 1 addition, 0 deletionsinclude/asm-i386/page.h
- include/asm-i386/pgtable.h 1 addition, 1 deletioninclude/asm-i386/pgtable.h
- include/asm-ia64/pgtable.h 1 addition, 0 deletionsinclude/asm-ia64/pgtable.h
- include/asm-sh/page.h 1 addition, 0 deletionsinclude/asm-sh/page.h
- include/asm-sh/pgtable.h 1 addition, 0 deletionsinclude/asm-sh/pgtable.h
- include/asm-sh64/page.h 1 addition, 0 deletionsinclude/asm-sh64/page.h
- include/asm-sh64/pgtable.h 2 additions, 0 deletionsinclude/asm-sh64/pgtable.h
- include/asm-sparc64/page.h 2 additions, 0 deletionsinclude/asm-sparc64/page.h
- include/asm-sparc64/pgtable.h 1 addition, 0 deletionsinclude/asm-sparc64/pgtable.h
- include/asm-x86_64/page.h 1 addition, 0 deletionsinclude/asm-x86_64/page.h
- include/asm-x86_64/pgtable.h 2 additions, 1 deletioninclude/asm-x86_64/pgtable.h
- include/linux/hugetlb.h 34 additions, 6 deletionsinclude/linux/hugetlb.h
- mm/hugetlb.c 176 additions, 1 deletionmm/hugetlb.c
Loading
Please register or sign in to comment