The patch titled Subject: alpha: expose number of page table levels on Kconfig level has been added to the -mm tree. Its filename is alpha-expose-number-of-page-table-levels-on-kconfig-level.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/alpha-expose-number-of-page-table-levels-on-kconfig-level.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/alpha-expose-number-of-page-table-levels-on-kconfig-level.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> Subject: alpha: expose number of page table levels on Kconfig level I've implemented accounting for pmd page tables as we have for pte (see mm->nr_ptes). It's requires a new counter in mm_struct: mm->nr_pmds. But the feature doesn't make any sense if an architecture has PMD level folded and it would be nice get rid of the counter in this case. The problem is that we cannot use __PAGETABLE_PMD_FOLDED in <linux/mm_types.h> due to circular dependencies: <linux/mm_types> -> <asm/pgtable.h> -> <linux/mm_types.h> In most cases <asm/pgtable.h> wants <linux/mm_types.h> to get definition of struct page and struct vm_area_struct. I've tried to split mm_struct into separate header file to be able to user <asm/pgtable.h> there. But it doesn't fly on some architectures, like ARM: it wants mm_struct <asm/pgtable.h> to implement tlb flushing. I don't see how to fix it without massive de-inlining or coverting a lot for inline functions to macros. This is other approach: expose number of page tables in use via Kconfig and use it in <linux/mm_types.h> instead of __PAGETABLE_PMD_FOLDED from <asm/pgtable.h>. This patch (of 19): We would want to use number of page table level to define mm_struct. Let's expose it as CONFIG_PGTABLE_LEVELS. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Acked-by: Richard Henderson <rth@xxxxxxxxxxx> Cc: Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx> Cc: Matt Turner <mattst88@xxxxxxxxx> Tested-by: Guenter Roeck <linux@xxxxxxxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Cc: "James E.J. Bottomley" <jejb@xxxxxxxxxxxxxxxx> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Chris Metcalf <cmetcalf@xxxxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Cc: Fenghua Yu <fenghua.yu@xxxxxxxxx> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Cc: Helge Deller <deller@xxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Jeff Dike <jdike@xxxxxxxxxxx> Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Koichi Yasutake <yasutake.koichi@xxxxxxxxxxxxxxxx> Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Cc: Richard Weinberger <richard@xxxxxx> Cc: Russell King <linux@xxxxxxxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Tony Luck <tony.luck@xxxxxxxxx> Cc: Will Deacon <will.deacon@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/alpha/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff -puN arch/alpha/Kconfig~alpha-expose-number-of-page-table-levels-on-kconfig-level arch/alpha/Kconfig --- a/arch/alpha/Kconfig~alpha-expose-number-of-page-table-levels-on-kconfig-level +++ a/arch/alpha/Kconfig @@ -76,6 +76,10 @@ config GENERIC_ISA_DMA bool default y +config PGTABLE_LEVELS + int + default 3 + source "init/Kconfig" source "kernel/Kconfig.freezer" _ Patches currently in -mm which might be from kirill.shutemov@xxxxxxxxxxxxxxx are mm-rename-foll_mlock-to-foll_populate.patch mm-rename-__mlock_vma_pages_range-to-populate_vma_page_range.patch mm-move-gup-posix-mlock-error-conversion-out-of-__mm_populate.patch mm-move-mm_populate-related-code-to-mm-gupc.patch mm-incorporate-zero-pages-into-transparent-huge-pages.patch mm-incorporate-zero-pages-into-transparent-huge-pages-fix.patch alpha-expose-number-of-page-table-levels-on-kconfig-level.patch arm64-expose-number-of-page-table-levels-on-kconfig-level.patch arm-expose-number-of-page-table-levels-on-kconfig-level.patch frv-mark-pud-and-pmd-folded.patch ia64-expose-number-of-page-table-levels-on-kconfig-level.patch m32r-mark-pmd-folded.patch m68k-mark-pmd-folded-and-expose-number-of-page-table-levels.patch mips-expose-number-of-page-table-levels-on-kconfig-level.patch mn10300-mark-pud-and-pmd-folded.patch parisc-expose-number-of-page-table-levels-on-kconfig-level.patch powerpc-expose-number-of-page-table-levels-on-kconfig-level.patch s390-expose-number-of-page-table-levels.patch sh-expose-number-of-page-table-levels.patch sparc-expose-number-of-page-table-levels.patch tile-expose-number-of-page-table-levels.patch um-expose-number-of-page-table-levels.patch x86-expose-number-of-page-table-levels-on-kconfig-level.patch mm-define-default-pgtable_levels-to-two.patch mm-do-not-add-nr_pmds-into-mm_struct-if-pmd-is-folded.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html