diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-04 18:49:19 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-04 18:49:19 +0100 |
commit | 28b1bd1cbc33cae95a309691d814399a69cf3070 (patch) | |
tree | 6474d10332662f5302be0df8527c9e9e31e32a95 /mm | |
parent | 2602c3ba4508f528db024c1d209256513ea05de6 (diff) | |
parent | 1075414b06109a99b0e87601e84c74a95bd45681 (diff) | |
download | op-kernel-dev-28b1bd1cbc33cae95a309691d814399a69cf3070.zip op-kernel-dev-28b1bd1cbc33cae95a309691d814399a69cf3070.tar.gz |
Merge branch 'core/locking' into tracing/ftrace
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 5 | ||||
-rw-r--r-- | mm/slab.c | 4 | ||||
-rw-r--r-- | mm/slob.c | 2 | ||||
-rw-r--r-- | mm/slub.c | 1 | ||||
-rw-r--r-- | mm/vmscan.c | 2 |
5 files changed, 14 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5c44ed4..a3803ea 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1479,6 +1479,8 @@ __alloc_pages_internal(gfp_t gfp_mask, unsigned int order, unsigned long did_some_progress; unsigned long pages_reclaimed = 0; + lockdep_trace_alloc(gfp_mask); + might_sleep_if(wait); if (should_fail_alloc_page(gfp_mask, order)) @@ -1578,12 +1580,15 @@ nofail_alloc: */ cpuset_update_task_memory_state(); p->flags |= PF_MEMALLOC; + + lockdep_set_current_reclaim_state(gfp_mask); reclaim_state.reclaimed_slab = 0; p->reclaim_state = &reclaim_state; did_some_progress = try_to_free_pages(zonelist, order, gfp_mask); p->reclaim_state = NULL; + lockdep_clear_current_reclaim_state(); p->flags &= ~PF_MEMALLOC; cond_resched(); @@ -3327,6 +3327,8 @@ __cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid, unsigned long save_flags; void *ptr; + lockdep_trace_alloc(flags); + if (slab_should_failslab(cachep, flags)) return NULL; @@ -3403,6 +3405,8 @@ __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller) unsigned long save_flags; void *objp; + lockdep_trace_alloc(flags); + if (slab_should_failslab(cachep, flags)) return NULL; @@ -466,6 +466,8 @@ void *__kmalloc_node(size_t size, gfp_t gfp, int node) int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); void *ret; + lockdep_trace_alloc(flags); + if (size < PAGE_SIZE - align) { if (!size) return ZERO_SIZE_PTR; @@ -1597,6 +1597,7 @@ static __always_inline void *slab_alloc(struct kmem_cache *s, unsigned long flags; unsigned int objsize; + lockdep_trace_alloc(gfpflags); might_sleep_if(gfpflags & __GFP_WAIT); if (should_failslab(s->objsize, gfpflags)) diff --git a/mm/vmscan.c b/mm/vmscan.c index 6177e3b..ae6f4c1 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1965,6 +1965,8 @@ static int kswapd(void *p) }; node_to_cpumask_ptr(cpumask, pgdat->node_id); + lockdep_set_current_reclaim_state(GFP_KERNEL); + if (!cpumask_empty(cpumask)) set_cpus_allowed_ptr(tsk, cpumask); current->reclaim_state = &reclaim_state; |