Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755436AbbBFOvN (ORCPT ); Fri, 6 Feb 2015 09:51:13 -0500 Received: from mga03.intel.com ([134.134.136.65]:7377 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752756AbbBFOvM (ORCPT ); Fri, 6 Feb 2015 09:51:12 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="450830759" From: "Kirill A. Shutemov" To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: [PATCHv2, RESEND 00/19] expose page table levels as Kconfig option Date: Fri, 6 Feb 2015 16:50:45 +0200 Message-Id: <1423234264-197684-1-git-send-email-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5492 Lines: 112 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 due to circular dependencies: -> -> In most cases wants 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 there. But it doesn't fly on some architectures, like ARM: it wants mm_struct 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 instead of __PAGETABLE_PMD_FOLDED from . v2: - powerpc: s/64K_PAGES/PPC_64K_PAGES/; - s390: fix typo s/64BI/64BIT/; - ia64: fix default for IA64_PAGE_SIZE_64KB; - x86: s/PAGETABLE_LEVELS/CONFIG_PGTABLE_LEVELS/ include/trace/events/xen.h; Kirill A. Shutemov (19): alpha: expose number of page table levels on Kconfig level arm64: expose number of page table levels on Kconfig level arm: expose number of page table levels on Kconfig level frv: mark PUD and PMD folded ia64: expose number of page table levels on Kconfig level m32r: mark PMD folded m68k: mark PMD folded and expose number of page table levels mips: expose number of page table levels on Kconfig level mn10300: mark PUD and PMD folded parisc: expose number of page table levels on Kconfig level powerpc: expose number of page table levels on Kconfig level s390: expose number of page table levels sh: expose number of page table levels sparc: expose number of page table levels tile: expose number of page table levels um: expose number of page table levels x86: expose number of page table levels on Kconfig level mm: define default PGTABLE_LEVELS to two mm: do not add nr_pmds into mm_struct if PMD is folded arch/Kconfig | 4 ++++ arch/alpha/Kconfig | 4 ++++ arch/arm/Kconfig | 5 +++++ arch/arm64/Kconfig | 14 +++++++------- arch/arm64/include/asm/kvm_mmu.h | 4 ++-- arch/arm64/include/asm/page.h | 4 ++-- arch/arm64/include/asm/pgalloc.h | 8 ++++---- arch/arm64/include/asm/pgtable-hwdef.h | 6 +++--- arch/arm64/include/asm/pgtable-types.h | 12 ++++++------ arch/arm64/include/asm/pgtable.h | 8 ++++---- arch/arm64/include/asm/tlb.h | 4 ++-- arch/arm64/mm/mmu.c | 4 ++-- arch/frv/include/asm/pgtable.h | 2 ++ arch/ia64/Kconfig | 18 +++++------------- arch/ia64/include/asm/page.h | 4 ++-- arch/ia64/include/asm/pgalloc.h | 4 ++-- arch/ia64/include/asm/pgtable.h | 12 ++++++------ arch/ia64/kernel/ivt.S | 12 ++++++------ arch/ia64/kernel/machine_kexec.c | 4 ++-- arch/m32r/include/asm/pgtable-2level.h | 1 + arch/m68k/Kconfig | 4 ++++ arch/m68k/include/asm/pgtable_mm.h | 2 ++ arch/mips/Kconfig | 5 +++++ arch/mn10300/include/asm/pgtable.h | 2 ++ arch/parisc/Kconfig | 5 +++++ arch/parisc/include/asm/pgalloc.h | 2 +- arch/parisc/include/asm/pgtable.h | 17 ++++++++--------- arch/parisc/kernel/entry.S | 4 ++-- arch/parisc/kernel/head.S | 4 ++-- arch/parisc/mm/init.c | 2 +- arch/powerpc/Kconfig | 6 ++++++ arch/s390/Kconfig | 5 +++++ arch/s390/include/asm/pgtable.h | 2 ++ arch/sh/Kconfig | 4 ++++ arch/sparc/Kconfig | 4 ++++ arch/tile/Kconfig | 5 +++++ arch/um/Kconfig.um | 5 +++++ arch/x86/Kconfig | 6 ++++++ arch/x86/include/asm/paravirt.h | 8 ++++---- arch/x86/include/asm/paravirt_types.h | 8 ++++---- arch/x86/include/asm/pgalloc.h | 8 ++++---- arch/x86/include/asm/pgtable-2level_types.h | 1 - arch/x86/include/asm/pgtable-3level_types.h | 2 -- arch/x86/include/asm/pgtable.h | 8 ++++---- arch/x86/include/asm/pgtable_64_types.h | 1 - arch/x86/include/asm/pgtable_types.h | 4 ++-- arch/x86/kernel/paravirt.c | 6 +++--- arch/x86/mm/pgtable.c | 14 +++++++------- arch/x86/xen/mmu.c | 14 +++++++------- include/asm-generic/pgtable.h | 5 +++++ include/linux/mm_types.h | 2 ++ include/trace/events/xen.h | 2 +- 52 files changed, 183 insertions(+), 118 deletions(-) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/