diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d61671260f92..30b0b97ad023 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -456,7 +456,7 @@ static void __free_pages_ok(struct page *page, unsigned int order) | |||
456 | 456 | ||
457 | kernel_map_pages(page, 1 << order, 0); | 457 | kernel_map_pages(page, 1 << order, 0); |
458 | local_irq_save(flags); | 458 | local_irq_save(flags); |
459 | __mod_page_state(pgfree, 1 << order); | 459 | __count_vm_events(PGFREE, 1 << order); |
460 | free_one_page(page_zone(page), page, order); | 460 | free_one_page(page_zone(page), page, order); |
461 | local_irq_restore(flags); | 461 | local_irq_restore(flags); |
462 | } | 462 | } |
@@ -729,7 +729,7 @@ static void fastcall free_hot_cold_page(struct page *page, int cold) | |||
729 | 729 | ||
730 | pcp = &zone_pcp(zone, get_cpu())->pcp[cold]; | 730 | pcp = &zone_pcp(zone, get_cpu())->pcp[cold]; |
731 | local_irq_save(flags); | 731 | local_irq_save(flags); |
732 | __inc_page_state(pgfree); | 732 | __count_vm_event(PGFREE); |
733 | list_add(&page->lru, &pcp->list); | 733 | list_add(&page->lru, &pcp->list); |
734 | pcp->count++; | 734 | pcp->count++; |
735 | if (pcp->count >= pcp->high) { | 735 | if (pcp->count >= pcp->high) { |
@@ -805,7 +805,7 @@ again: | |||
805 | goto failed; | 805 | goto failed; |
806 | } | 806 | } |
807 | 807 | ||
808 | __mod_page_state_zone(zone, pgalloc, 1 << order); | 808 | __count_zone_vm_events(PGALLOC, zone, 1 << order); |
809 | zone_statistics(zonelist, zone); | 809 | zone_statistics(zonelist, zone); |
810 | local_irq_restore(flags); | 810 | local_irq_restore(flags); |
811 | put_cpu(); | 811 | put_cpu(); |
@@ -2101,24 +2101,11 @@ static int page_alloc_cpu_notify(struct notifier_block *self, | |||
2101 | unsigned long action, void *hcpu) | 2101 | unsigned long action, void *hcpu) |
2102 | { | 2102 | { |
2103 | int cpu = (unsigned long)hcpu; | 2103 | int cpu = (unsigned long)hcpu; |
2104 | unsigned long *src, *dest; | ||
2105 | 2104 | ||
2106 | if (action == CPU_DEAD) { | 2105 | if (action == CPU_DEAD) { |
2107 | int i; | ||
2108 | |||
2109 | local_irq_disable(); | 2106 | local_irq_disable(); |
2110 | __drain_pages(cpu); | 2107 | __drain_pages(cpu); |
2111 | 2108 | vm_events_fold_cpu(cpu); | |
2112 | /* Add dead cpu's page_states to our own. */ | ||
2113 | dest = (unsigned long *)&__get_cpu_var(page_states); | ||
2114 | src = (unsigned long *)&per_cpu(page_states, cpu); | ||
2115 | |||
2116 | for (i = 0; i < sizeof(struct page_state)/sizeof(unsigned long); | ||
2117 | i++) { | ||
2118 | dest[i] += src[i]; | ||
2119 | src[i] = 0; | ||
2120 | } | ||
2121 | |||
2122 | local_irq_enable(); | 2109 | local_irq_enable(); |
2123 | refresh_cpu_vm_stats(cpu); | 2110 | refresh_cpu_vm_stats(cpu); |
2124 | } | 2111 | } |