aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/page-writeback.c3
-rw-r--r--mm/rmap.c5
-rw-r--r--mm/vmscan.c3
-rw-r--r--mm/vmstat.c1
4 files changed, 8 insertions, 4 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 60c7244c42e4..0faacfe18909 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -111,7 +111,8 @@ static void get_writeback_state(struct writeback_state *wbs)
111{ 111{
112 wbs->nr_dirty = read_page_state(nr_dirty); 112 wbs->nr_dirty = read_page_state(nr_dirty);
113 wbs->nr_unstable = read_page_state(nr_unstable); 113 wbs->nr_unstable = read_page_state(nr_unstable);
114 wbs->nr_mapped = global_page_state(NR_FILE_MAPPED); 114 wbs->nr_mapped = global_page_state(NR_FILE_MAPPED) +
115 global_page_state(NR_ANON_PAGES);
115 wbs->nr_writeback = read_page_state(nr_writeback); 116 wbs->nr_writeback = read_page_state(nr_writeback);
116} 117}
117 118
diff --git a/mm/rmap.c b/mm/rmap.c
index af5e9808e65d..40158b59729e 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -455,7 +455,7 @@ static void __page_set_anon_rmap(struct page *page,
455 * nr_mapped state can be updated without turning off 455 * nr_mapped state can be updated without turning off
456 * interrupts because it is not modified via interrupt. 456 * interrupts because it is not modified via interrupt.
457 */ 457 */
458 __inc_zone_page_state(page, NR_FILE_MAPPED); 458 __inc_zone_page_state(page, NR_ANON_PAGES);
459} 459}
460 460
461/** 461/**
@@ -531,7 +531,8 @@ void page_remove_rmap(struct page *page)
531 */ 531 */
532 if (page_test_and_clear_dirty(page)) 532 if (page_test_and_clear_dirty(page))
533 set_page_dirty(page); 533 set_page_dirty(page);
534 __dec_zone_page_state(page, NR_FILE_MAPPED); 534 __dec_zone_page_state(page,
535 PageAnon(page) ? NR_ANON_PAGES : NR_FILE_MAPPED);
535 } 536 }
536} 537}
537 538
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 08bc54e80862..2f0390161c0e 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -742,7 +742,8 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
742 * how much memory 742 * how much memory
743 * is mapped. 743 * is mapped.
744 */ 744 */
745 mapped_ratio = (global_page_state(NR_FILE_MAPPED) * 100) / 745 mapped_ratio = ((global_page_state(NR_FILE_MAPPED) +
746 global_page_state(NR_ANON_PAGES)) * 100) /
746 vm_total_pages; 747 vm_total_pages;
747 748
748 /* 749 /*
diff --git a/mm/vmstat.c b/mm/vmstat.c
index f16b33eb6d5c..3baf4dffa62a 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -395,6 +395,7 @@ struct seq_operations fragmentation_op = {
395 395
396static char *vmstat_text[] = { 396static char *vmstat_text[] = {
397 /* Zoned VM counters */ 397 /* Zoned VM counters */
398 "nr_anon_pages",
398 "nr_mapped", 399 "nr_mapped",
399 "nr_file_pages", 400 "nr_file_pages",
400 401