aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-03-04 12:49:19 -0500
committerIngo Molnar <mingo@elte.hu>2009-03-04 12:49:19 -0500
commit28b1bd1cbc33cae95a309691d814399a69cf3070 (patch)
tree6474d10332662f5302be0df8527c9e9e31e32a95 /mm
parent2602c3ba4508f528db024c1d209256513ea05de6 (diff)
parent1075414b06109a99b0e87601e84c74a95bd45681 (diff)
Merge branch 'core/locking' into tracing/ftrace
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c5
-rw-r--r--mm/slab.c4
-rw-r--r--mm/slob.c2
-rw-r--r--mm/slub.c1
-rw-r--r--mm/vmscan.c2
5 files changed, 14 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5c44ed49ca93..a3803ea8c27d 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,
1479 unsigned long did_some_progress; 1479 unsigned long did_some_progress;
1480 unsigned long pages_reclaimed = 0; 1480 unsigned long pages_reclaimed = 0;
1481 1481
1482 lockdep_trace_alloc(gfp_mask);
1483
1482 might_sleep_if(wait); 1484 might_sleep_if(wait);
1483 1485
1484 if (should_fail_alloc_page(gfp_mask, order)) 1486 if (should_fail_alloc_page(gfp_mask, order))
@@ -1578,12 +1580,15 @@ nofail_alloc:
1578 */ 1580 */
1579 cpuset_update_task_memory_state(); 1581 cpuset_update_task_memory_state();
1580 p->flags |= PF_MEMALLOC; 1582 p->flags |= PF_MEMALLOC;
1583
1584 lockdep_set_current_reclaim_state(gfp_mask);
1581 reclaim_state.reclaimed_slab = 0; 1585 reclaim_state.reclaimed_slab = 0;
1582 p->reclaim_state = &reclaim_state; 1586 p->reclaim_state = &reclaim_state;
1583 1587
1584 did_some_progress = try_to_free_pages(zonelist, order, gfp_mask); 1588 did_some_progress = try_to_free_pages(zonelist, order, gfp_mask);
1585 1589
1586 p->reclaim_state = NULL; 1590 p->reclaim_state = NULL;
1591 lockdep_clear_current_reclaim_state();
1587 p->flags &= ~PF_MEMALLOC; 1592 p->flags &= ~PF_MEMALLOC;
1588 1593
1589 cond_resched(); 1594 cond_resched();
diff --git a/mm/slab.c b/mm/slab.c
index aeeb4ecb9428..9ec66c3e6ee0 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3327,6 +3327,8 @@ __cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid,
3327 unsigned long save_flags; 3327 unsigned long save_flags;
3328 void *ptr; 3328 void *ptr;
3329 3329
3330 lockdep_trace_alloc(flags);
3331
3330 if (slab_should_failslab(cachep, flags)) 3332 if (slab_should_failslab(cachep, flags))
3331 return NULL; 3333 return NULL;
3332 3334
@@ -3403,6 +3405,8 @@ __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller)
3403 unsigned long save_flags; 3405 unsigned long save_flags;
3404 void *objp; 3406 void *objp;
3405 3407
3408 lockdep_trace_alloc(flags);
3409
3406 if (slab_should_failslab(cachep, flags)) 3410 if (slab_should_failslab(cachep, flags))
3407 return NULL; 3411 return NULL;
3408 3412
diff --git a/mm/slob.c b/mm/slob.c
index f9cc24688232..596152926a8d 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -466,6 +466,8 @@ void *__kmalloc_node(size_t size, gfp_t gfp, int node)
466 int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); 466 int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
467 void *ret; 467 void *ret;
468 468
469 lockdep_trace_alloc(flags);
470
469 if (size < PAGE_SIZE - align) { 471 if (size < PAGE_SIZE - align) {
470 if (!size) 472 if (!size)
471 return ZERO_SIZE_PTR; 473 return ZERO_SIZE_PTR;
diff --git a/mm/slub.c b/mm/slub.c
index 6de5e07c8850..816734ed8aa3 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1597,6 +1597,7 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
1597 unsigned long flags; 1597 unsigned long flags;
1598 unsigned int objsize; 1598 unsigned int objsize;
1599 1599
1600 lockdep_trace_alloc(gfpflags);
1600 might_sleep_if(gfpflags & __GFP_WAIT); 1601 might_sleep_if(gfpflags & __GFP_WAIT);
1601 1602
1602 if (should_failslab(s->objsize, gfpflags)) 1603 if (should_failslab(s->objsize, gfpflags))
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 6177e3bcd66b..ae6f4c174a12 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1965,6 +1965,8 @@ static int kswapd(void *p)
1965 }; 1965 };
1966 node_to_cpumask_ptr(cpumask, pgdat->node_id); 1966 node_to_cpumask_ptr(cpumask, pgdat->node_id);
1967 1967
1968 lockdep_set_current_reclaim_state(GFP_KERNEL);
1969
1968 if (!cpumask_empty(cpumask)) 1970 if (!cpumask_empty(cpumask))
1969 set_cpus_allowed_ptr(tsk, cpumask); 1971 set_cpus_allowed_ptr(tsk, cpumask);
1970 current->reclaim_state = &reclaim_state; 1972 current->reclaim_state = &reclaim_state;