[PATCH 4/4] mm: do not add nr_pmds into mm_struct if PMD is folded

From: Kirill A. Shutemov
Date: Wed Jan 28 2015 - 15:17:12 EST


Everything seems in place. We can now include <asm/pgtable.h> in
<linux/mm_struct.h>.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
---
include/linux/mm_struct.h | 3 +++
1 file changed, 3 insertions(+)

diff --git a/include/linux/mm_struct.h b/include/linux/mm_struct.h
index 0a233c232a39..1759bed3dc61 100644
--- a/include/linux/mm_struct.h
+++ b/include/linux/mm_struct.h
@@ -8,6 +8,7 @@
#include <linux/uprobes.h>

#include <asm/mmu.h>
+#include <asm/pgtable.h>

struct kioctx_table;
struct vm_area_struct;
@@ -54,7 +55,9 @@ struct mm_struct {
atomic_t mm_users; /* How many users with user space? */
atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */
atomic_long_t nr_ptes; /* PTE page table pages */
+#if !__PAGETABLE_PMD_FOLDED
atomic_long_t nr_pmds; /* PMD page table pages */
+#endif
int map_count; /* number of VMAs */

spinlock_t page_table_lock; /* Protects page tables and some counters */
--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/