diff options
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index d6942436ac97..ff2ebe9458a3 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -215,7 +215,7 @@ unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, | |||
215 | break; | 215 | break; |
216 | if (shrink_ret < nr_before) | 216 | if (shrink_ret < nr_before) |
217 | ret += nr_before - shrink_ret; | 217 | ret += nr_before - shrink_ret; |
218 | mod_page_state(slabs_scanned, this_scan); | 218 | count_vm_events(SLABS_SCANNED, this_scan); |
219 | total_scan -= this_scan; | 219 | total_scan -= this_scan; |
220 | 220 | ||
221 | cond_resched(); | 221 | cond_resched(); |
@@ -569,7 +569,7 @@ keep: | |||
569 | list_splice(&ret_pages, page_list); | 569 | list_splice(&ret_pages, page_list); |
570 | if (pagevec_count(&freed_pvec)) | 570 | if (pagevec_count(&freed_pvec)) |
571 | __pagevec_release_nonlru(&freed_pvec); | 571 | __pagevec_release_nonlru(&freed_pvec); |
572 | mod_page_state(pgactivate, pgactivate); | 572 | count_vm_events(PGACTIVATE, pgactivate); |
573 | return nr_reclaimed; | 573 | return nr_reclaimed; |
574 | } | 574 | } |
575 | 575 | ||
@@ -659,11 +659,11 @@ static unsigned long shrink_inactive_list(unsigned long max_scan, | |||
659 | nr_reclaimed += nr_freed; | 659 | nr_reclaimed += nr_freed; |
660 | local_irq_disable(); | 660 | local_irq_disable(); |
661 | if (current_is_kswapd()) { | 661 | if (current_is_kswapd()) { |
662 | __mod_page_state_zone(zone, pgscan_kswapd, nr_scan); | 662 | __count_zone_vm_events(PGSCAN_KSWAPD, zone, nr_scan); |
663 | __mod_page_state(kswapd_steal, nr_freed); | 663 | __count_vm_events(KSWAPD_STEAL, nr_freed); |
664 | } else | 664 | } else |
665 | __mod_page_state_zone(zone, pgscan_direct, nr_scan); | 665 | __count_zone_vm_events(PGSCAN_DIRECT, zone, nr_scan); |
666 | __mod_page_state_zone(zone, pgsteal, nr_freed); | 666 | __count_vm_events(PGACTIVATE, nr_freed); |
667 | 667 | ||
668 | if (nr_taken == 0) | 668 | if (nr_taken == 0) |
669 | goto done; | 669 | goto done; |
@@ -841,11 +841,10 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, | |||
841 | } | 841 | } |
842 | } | 842 | } |
843 | zone->nr_active += pgmoved; | 843 | zone->nr_active += pgmoved; |
844 | spin_unlock(&zone->lru_lock); | ||
845 | 844 | ||
846 | __mod_page_state_zone(zone, pgrefill, pgscanned); | 845 | __count_zone_vm_events(PGREFILL, zone, pgscanned); |
847 | __mod_page_state(pgdeactivate, pgdeactivate); | 846 | __count_vm_events(PGDEACTIVATE, pgdeactivate); |
848 | local_irq_enable(); | 847 | spin_unlock_irq(&zone->lru_lock); |
849 | 848 | ||
850 | pagevec_release(&pvec); | 849 | pagevec_release(&pvec); |
851 | } | 850 | } |
@@ -977,7 +976,7 @@ unsigned long try_to_free_pages(struct zone **zones, gfp_t gfp_mask) | |||
977 | .swappiness = vm_swappiness, | 976 | .swappiness = vm_swappiness, |
978 | }; | 977 | }; |
979 | 978 | ||
980 | inc_page_state(allocstall); | 979 | count_vm_event(ALLOCSTALL); |
981 | 980 | ||
982 | for (i = 0; zones[i] != NULL; i++) { | 981 | for (i = 0; zones[i] != NULL; i++) { |
983 | struct zone *zone = zones[i]; | 982 | struct zone *zone = zones[i]; |
@@ -1074,7 +1073,7 @@ loop_again: | |||
1074 | total_scanned = 0; | 1073 | total_scanned = 0; |
1075 | nr_reclaimed = 0; | 1074 | nr_reclaimed = 0; |
1076 | sc.may_writepage = !laptop_mode; | 1075 | sc.may_writepage = !laptop_mode; |
1077 | inc_page_state(pageoutrun); | 1076 | count_vm_event(PAGEOUTRUN); |
1078 | 1077 | ||
1079 | for (i = 0; i < pgdat->nr_zones; i++) { | 1078 | for (i = 0; i < pgdat->nr_zones; i++) { |
1080 | struct zone *zone = pgdat->node_zones + i; | 1079 | struct zone *zone = pgdat->node_zones + i; |