aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/memory_hotplug.c4
-rw-r--r--mm/mempolicy.c3
-rw-r--r--mm/migrate.c12
3 files changed, 11 insertions, 8 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 2047465cd27c..e8116f8bdffa 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -27,6 +27,7 @@
27#include <linux/page-isolation.h> 27#include <linux/page-isolation.h>
28#include <linux/pfn.h> 28#include <linux/pfn.h>
29#include <linux/suspend.h> 29#include <linux/suspend.h>
30#include <linux/mm_inline.h>
30 31
31#include <asm/tlbflush.h> 32#include <asm/tlbflush.h>
32 33
@@ -672,6 +673,9 @@ do_migrate_range(unsigned long start_pfn, unsigned long end_pfn)
672 if (!ret) { /* Success */ 673 if (!ret) { /* Success */
673 list_add_tail(&page->lru, &source); 674 list_add_tail(&page->lru, &source);
674 move_pages--; 675 move_pages--;
676 inc_zone_page_state(page, NR_ISOLATED_ANON +
677 page_is_file_cache(page));
678
675 } else { 679 } else {
676 /* Becasue we don't have big zone->lock. we should 680 /* Becasue we don't have big zone->lock. we should
677 check this again here. */ 681 check this again here. */
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 4545d5944243..0f89eabbaf3e 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -89,6 +89,7 @@
89#include <linux/security.h> 89#include <linux/security.h>
90#include <linux/syscalls.h> 90#include <linux/syscalls.h>
91#include <linux/ctype.h> 91#include <linux/ctype.h>
92#include <linux/mm_inline.h>
92 93
93#include <asm/tlbflush.h> 94#include <asm/tlbflush.h>
94#include <asm/uaccess.h> 95#include <asm/uaccess.h>
@@ -809,6 +810,8 @@ static void migrate_page_add(struct page *page, struct list_head *pagelist,
809 if ((flags & MPOL_MF_MOVE_ALL) || page_mapcount(page) == 1) { 810 if ((flags & MPOL_MF_MOVE_ALL) || page_mapcount(page) == 1) {
810 if (!isolate_lru_page(page)) { 811 if (!isolate_lru_page(page)) {
811 list_add_tail(&page->lru, pagelist); 812 list_add_tail(&page->lru, pagelist);
813 inc_zone_page_state(page, NR_ISOLATED_ANON +
814 page_is_file_cache(page));
812 } 815 }
813 } 816 }
814} 817}
diff --git a/mm/migrate.c b/mm/migrate.c
index 0bc640fd68fa..576c25eeb1ca 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -746,13 +746,6 @@ int migrate_pages(struct list_head *from,
746 struct page *page2; 746 struct page *page2;
747 int swapwrite = current->flags & PF_SWAPWRITE; 747 int swapwrite = current->flags & PF_SWAPWRITE;
748 int rc; 748 int rc;
749 unsigned long flags;
750
751 local_irq_save(flags);
752 list_for_each_entry(page, from, lru)
753 __inc_zone_page_state(page, NR_ISOLATED_ANON +
754 page_is_file_cache(page));
755 local_irq_restore(flags);
756 749
757 if (!swapwrite) 750 if (!swapwrite)
758 current->flags |= PF_SWAPWRITE; 751 current->flags |= PF_SWAPWRITE;
@@ -878,8 +871,11 @@ static int do_move_page_to_node_array(struct mm_struct *mm,
878 goto put_and_set; 871 goto put_and_set;
879 872
880 err = isolate_lru_page(page); 873 err = isolate_lru_page(page);
881 if (!err) 874 if (!err) {
882 list_add_tail(&page->lru, &pagelist); 875 list_add_tail(&page->lru, &pagelist);
876 inc_zone_page_state(page, NR_ISOLATED_ANON +
877 page_is_file_cache(page));
878 }
883put_and_set: 879put_and_set:
884 /* 880 /*
885 * Either remove the duplicate refcount from 881 * Either remove the duplicate refcount from