diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-07-05 02:30:55 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-07-05 02:30:58 -0400 |
commit | 08f8ba07998ab1b9efcdd3f28dadf6866a605ddb (patch) | |
tree | 8e09855446f7b0312bb729d4b539090756e57927 /mm | |
parent | 0879b100f3c187257729f36cba33d96ec2875766 (diff) | |
parent | 815c4163b6c8ebf8152f42b0a5fd015cfdcedc78 (diff) |
Merge commit 'v2.6.35-rc4' into perf/core
Merge reason: Pick up the latest perf fixes
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memcontrol.c | 4 | ||||
-rw-r--r-- | mm/mempolicy.c | 9 | ||||
-rw-r--r-- | mm/page-writeback.c | 5 |
3 files changed, 10 insertions, 8 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index c6ece0a57595..20a8193a7af8 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -1370,7 +1370,7 @@ static void memcg_wakeup_oom(struct mem_cgroup *mem) | |||
1370 | 1370 | ||
1371 | static void memcg_oom_recover(struct mem_cgroup *mem) | 1371 | static void memcg_oom_recover(struct mem_cgroup *mem) |
1372 | { | 1372 | { |
1373 | if (mem->oom_kill_disable && atomic_read(&mem->oom_lock)) | 1373 | if (atomic_read(&mem->oom_lock)) |
1374 | memcg_wakeup_oom(mem); | 1374 | memcg_wakeup_oom(mem); |
1375 | } | 1375 | } |
1376 | 1376 | ||
@@ -3781,6 +3781,8 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp, | |||
3781 | return -EINVAL; | 3781 | return -EINVAL; |
3782 | } | 3782 | } |
3783 | mem->oom_kill_disable = val; | 3783 | mem->oom_kill_disable = val; |
3784 | if (!val) | ||
3785 | memcg_oom_recover(mem); | ||
3784 | cgroup_unlock(); | 3786 | cgroup_unlock(); |
3785 | return 0; | 3787 | return 0; |
3786 | } | 3788 | } |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 5d6fb339de03..5bc0a96beb51 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -2094,7 +2094,7 @@ void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol) | |||
2094 | NODEMASK_SCRATCH(scratch); | 2094 | NODEMASK_SCRATCH(scratch); |
2095 | 2095 | ||
2096 | if (!scratch) | 2096 | if (!scratch) |
2097 | return; | 2097 | goto put_mpol; |
2098 | /* contextualize the tmpfs mount point mempolicy */ | 2098 | /* contextualize the tmpfs mount point mempolicy */ |
2099 | new = mpol_new(mpol->mode, mpol->flags, &mpol->w.user_nodemask); | 2099 | new = mpol_new(mpol->mode, mpol->flags, &mpol->w.user_nodemask); |
2100 | if (IS_ERR(new)) | 2100 | if (IS_ERR(new)) |
@@ -2103,19 +2103,20 @@ void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol) | |||
2103 | task_lock(current); | 2103 | task_lock(current); |
2104 | ret = mpol_set_nodemask(new, &mpol->w.user_nodemask, scratch); | 2104 | ret = mpol_set_nodemask(new, &mpol->w.user_nodemask, scratch); |
2105 | task_unlock(current); | 2105 | task_unlock(current); |
2106 | mpol_put(mpol); /* drop our ref on sb mpol */ | ||
2107 | if (ret) | 2106 | if (ret) |
2108 | goto put_free; | 2107 | goto put_new; |
2109 | 2108 | ||
2110 | /* Create pseudo-vma that contains just the policy */ | 2109 | /* Create pseudo-vma that contains just the policy */ |
2111 | memset(&pvma, 0, sizeof(struct vm_area_struct)); | 2110 | memset(&pvma, 0, sizeof(struct vm_area_struct)); |
2112 | pvma.vm_end = TASK_SIZE; /* policy covers entire file */ | 2111 | pvma.vm_end = TASK_SIZE; /* policy covers entire file */ |
2113 | mpol_set_shared_policy(sp, &pvma, new); /* adds ref */ | 2112 | mpol_set_shared_policy(sp, &pvma, new); /* adds ref */ |
2114 | 2113 | ||
2115 | put_free: | 2114 | put_new: |
2116 | mpol_put(new); /* drop initial ref */ | 2115 | mpol_put(new); /* drop initial ref */ |
2117 | free_scratch: | 2116 | free_scratch: |
2118 | NODEMASK_SCRATCH_FREE(scratch); | 2117 | NODEMASK_SCRATCH_FREE(scratch); |
2118 | put_mpol: | ||
2119 | mpol_put(mpol); /* drop our incoming ref on sb mpol */ | ||
2119 | } | 2120 | } |
2120 | } | 2121 | } |
2121 | 2122 | ||
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index bbd396ac9546..54f28bd493d3 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -597,7 +597,7 @@ static void balance_dirty_pages(struct address_space *mapping, | |||
597 | (!laptop_mode && ((global_page_state(NR_FILE_DIRTY) | 597 | (!laptop_mode && ((global_page_state(NR_FILE_DIRTY) |
598 | + global_page_state(NR_UNSTABLE_NFS)) | 598 | + global_page_state(NR_UNSTABLE_NFS)) |
599 | > background_thresh))) | 599 | > background_thresh))) |
600 | bdi_start_writeback(bdi, NULL, 0); | 600 | bdi_start_background_writeback(bdi); |
601 | } | 601 | } |
602 | 602 | ||
603 | void set_page_dirty_balance(struct page *page, int page_mkwrite) | 603 | void set_page_dirty_balance(struct page *page, int page_mkwrite) |
@@ -705,9 +705,8 @@ void laptop_mode_timer_fn(unsigned long data) | |||
705 | * We want to write everything out, not just down to the dirty | 705 | * We want to write everything out, not just down to the dirty |
706 | * threshold | 706 | * threshold |
707 | */ | 707 | */ |
708 | |||
709 | if (bdi_has_dirty_io(&q->backing_dev_info)) | 708 | if (bdi_has_dirty_io(&q->backing_dev_info)) |
710 | bdi_start_writeback(&q->backing_dev_info, NULL, nr_pages); | 709 | bdi_start_writeback(&q->backing_dev_info, nr_pages); |
711 | } | 710 | } |
712 | 711 | ||
713 | /* | 712 | /* |