summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/proc-armv/rmap.h2
-rw-r--r--include/asm-generic/rmap.h2
-rw-r--r--include/linux/kernel_stat.h12
-rw-r--r--include/linux/page-flags.h3
4 files changed, 19 insertions, 0 deletions
diff --git a/include/asm-arm/proc-armv/rmap.h b/include/asm-arm/proc-armv/rmap.h
index 0a9a9a55fb63..f775d26eea88 100644
--- a/include/asm-arm/proc-armv/rmap.h
+++ b/include/asm-arm/proc-armv/rmap.h
@@ -17,6 +17,7 @@ static inline void pgtable_add_rmap(pte_t * ptep, struct mm_struct * mm, unsigne
page->mm = mm;
page->index = address & ~((PTRS_PER_PTE * PAGE_SIZE) - 1);
+ inc_page_state(nr_page_table_pages);
}
static inline void pgtable_remove_rmap(pte_t * ptep)
@@ -25,6 +26,7 @@ static inline void pgtable_remove_rmap(pte_t * ptep)
page->mm = NULL;
page->index = 0;
+ dec_page_state(nr_page_table_pages);
}
static inline struct mm_struct * ptep_to_mm(pte_t * ptep)
diff --git a/include/asm-generic/rmap.h b/include/asm-generic/rmap.h
index 09ddf42f8638..c7045f3e6923 100644
--- a/include/asm-generic/rmap.h
+++ b/include/asm-generic/rmap.h
@@ -27,12 +27,14 @@ static inline void pgtable_add_rmap(struct page * page, struct mm_struct * mm, u
#endif
page->mapping = (void *)mm;
page->index = address & ~((PTRS_PER_PTE * PAGE_SIZE) - 1);
+ inc_page_state(nr_page_table_pages);
}
static inline void pgtable_remove_rmap(struct page * page)
{
page->mapping = NULL;
page->index = 0;
+ dec_page_state(nr_page_table_pages);
}
static inline struct mm_struct * ptep_to_mm(pte_t * ptep)
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index de592f2ba451..75533ee86b73 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -26,6 +26,11 @@ struct kernel_stat {
unsigned int dk_drive_wblk[DK_MAX_MAJOR][DK_MAX_DISK];
unsigned int pgpgin, pgpgout;
unsigned int pswpin, pswpout;
+ unsigned int pgalloc, pgfree;
+ unsigned int pgactivate, pgdeactivate;
+ unsigned int pgfault, pgmajfault;
+ unsigned int pgscan, pgsteal;
+ unsigned int pageoutrun, allocstall;
#if !defined(CONFIG_ARCH_S390)
unsigned int irqs[NR_CPUS][NR_IRQS];
#endif
@@ -35,6 +40,13 @@ extern struct kernel_stat kstat;
extern unsigned long nr_context_switches(void);
+/*
+ * Maybe we need to smp-ify kernel_stat some day. It would be nice to do
+ * that without having to modify all the code that increments the stats.
+ */
+#define KERNEL_STAT_INC(x) kstat.x++
+#define KERNEL_STAT_ADD(x, y) kstat.x += y
+
#if !defined(CONFIG_ARCH_S390)
/*
* Number of interrupts per specific IRQ source, since bootup
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index a1efdff4d23c..f272b7d7f465 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -78,6 +78,9 @@ extern struct page_state {
unsigned long nr_pagecache;
unsigned long nr_active; /* on active_list LRU */
unsigned long nr_inactive; /* on inactive_list LRU */
+ unsigned long nr_page_table_pages;
+ unsigned long nr_pte_chain_pages;
+ unsigned long used_pte_chains_bytes;
} ____cacheline_aligned_in_smp page_states[NR_CPUS];
extern void get_page_state(struct page_state *ret);