Skip to content

RFC generic PAGE_SIZE infrastructure (v4)

Dave Hansen linux-ia64 linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest9 patches 17 repliesIn review

Changes from v3 from the cover letter

- fixed spurious delete of PTE_MASK in sh arch
- replaced ALIGN() macro with one which only evaluates the address a single time. (Thanks Nikita)
- replaced ppc _ALIGN* definitions with include of align.h

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9put alignment macros in align.harch/powerpc/kernel/prom.c arch/powerpc/kernel/prom_init.c arch/powerpc/mm/44x_mmu.c +9 more+48 -390 replies
2/9conditionally define generic get_order() (ARCH_HAS_GET_ORDER)include/asm-generic/page.h mm/Kconfig+7 -12 replies
3/9actual generic PAGE_SIZE infrastructureinclude/asm-generic/page.h mm/Kconfig+71 -37 replies
4/9ia64 generic PAGE_SIZEarch/ia64/Kconfig arch/ia64/configs/bigsur_defconfig arch/ia64/configs/gensparse_defconfig +8 more+38 -833 replies
5/9sparc64 generic PAGE_SIZEarch/sparc64/Kconfig arch/sparc64/defconfig arch/sparc64/mm/tsb.c +4 more+24 -601 reply
6/9mips generic PAGE_SIZEarch/mips/Kconfig include/asm-mips/page.h mm/Kconfig+13 -600 replies
7/9parisc generic PAGE_SIZEarch/parisc/Kconfig arch/parisc/defconfig arch/parisc/mm/init.c +3 more+17 -612 replies
8/9powerpc generic PAGE_SIZEarch/powerpc/Kconfig arch/powerpc/boot/page.h include/asm-powerpc/page.h +2 more+7 -420 replies
9/9convert the "easy" architectures to generic PAGE_SIZEarch/ia64/Kconfig arch/mips/Kconfig arch/parisc/Kconfig +24 more+27 -2050 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/9] generic PAGE_SIZE infrastructure (v4)

Changes from v3:
- fixed spurious delete of PTE_MASK in sh arch
- replaced ALIGN() macro with one which only evaluates the address a single time. (Thanks Nikita)
- replaced ppc _ALIGN* definitions with include of align.h

Changes from v2:
- included get_order() code to make it safe to include generic/page.h everywhere (using ARCH_HAS_GET_ORDER)
- updated mm/Kconfig text to make it more fitting for ia64
- added patch to consolidate _ALIGN with kernel.h's ALIGN() The assembly one has been left alone, but I guess we could put it here. However, the meaning of the two is quite different.

---

All architectures currently explicitly define their page size. In some cases (ppc, parisc, ia64, sparc64, mips) this size is somewhat configurable.

There several reimplementations of ways to make sure that PAGE_SIZE is usable in assembly code, yet still somewhat type safe for use in C code (as a UL type). These are all very similar. There are also a number of macros based off of PAGE_SIZE/SHIFT which are duplicated across architectures.

This patch unifies all of those definitions. It defines PAGE_SIZE in a single header which gets its definitions from Kconfig. The new Kconfig options mirror what used to be done with #ifdefs and arch-specific Kconfig options. The new Kconfig menu eliminates the need for parisc, ia64, and sparc64 to have their own "choice" menus for selecting page size. The help text has been adapted from these three architectures, but is now more generic.

Why am I doing this? The OpenVZ beancounter patch hooks into the alloc_thread_info() path, but only in two architectures. It is silly to patch each and every architecture when they all just do the same thing. This is the first step to have a single place in which to do alloc_thread_info(). Oh, and this series removes about 300 lines of code.

  59 files changed, 217 insertions(+), 502 deletions(-)