aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2010-03-05 16:41:47 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-06 14:26:24 -0500
commit76ca542d880ebe59a7a03c1597e73e1ded271857 (patch)
treed5e1a5dc88150ccbfeba811769ac066021b3041b /mm/vmscan.c
parent84b18490d1f1bc7ed5095c929f78bc002eb70f26 (diff)
mm, lockdep: annotate reclaim context to zone reclaim too
Commit cf40bd16fd ("lockdep: annotate reclaim context") introduced reclaim context annotation. But it didn't annotate zone reclaim. This patch do it. The point is, commit cf40bd16fd annotate __alloc_pages_direct_reclaim but zone-reclaim doesn't use __alloc_pages_direct_reclaim. current call graph is __alloc_pages_nodemask get_page_from_freelist zone_reclaim() __alloc_pages_slowpath __alloc_pages_direct_reclaim try_to_free_pages Actually, if zone_reclaim_mode=1, VM never call __alloc_pages_direct_reclaim in usual VM pressure. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Acked-by: Nick Piggin <npiggin@suse.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 62782057fcb9..bc0f8db8340f 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2557,6 +2557,7 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
2557 * and RECLAIM_SWAP. 2557 * and RECLAIM_SWAP.
2558 */ 2558 */
2559 p->flags |= PF_MEMALLOC | PF_SWAPWRITE; 2559 p->flags |= PF_MEMALLOC | PF_SWAPWRITE;
2560 lockdep_set_current_reclaim_state(gfp_mask);
2560 reclaim_state.reclaimed_slab = 0; 2561 reclaim_state.reclaimed_slab = 0;
2561 p->reclaim_state = &reclaim_state; 2562 p->reclaim_state = &reclaim_state;
2562 2563
@@ -2600,6 +2601,7 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
2600 2601
2601 p->reclaim_state = NULL; 2602 p->reclaim_state = NULL;
2602 current->flags &= ~(PF_MEMALLOC | PF_SWAPWRITE); 2603 current->flags &= ~(PF_MEMALLOC | PF_SWAPWRITE);
2604 lockdep_clear_current_reclaim_state();
2603 return sc.nr_reclaimed >= nr_pages; 2605 return sc.nr_reclaimed >= nr_pages;
2604} 2606}
2605 2607