diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-11-01 03:10:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-11-01 03:24:41 -0400 |
commit | fb10d5b7efbcc0aa9e46a9aa5ad86772c7bacb9a (patch) | |
tree | ea284fe7b9c17a85b8d3c4ba999d6e26d51a12f6 /mm/memory.c | |
parent | f9f9ffc237dd924f048204e8799da74f9ecf40cf (diff) | |
parent | 52469b4fcd4fc433ffc78cec4cf94368e9052890 (diff) |
Merge branch 'linus' into sched/core
Resolve cherry-picking conflicts:
Conflicts:
mm/huge_memory.c
mm/memory.c
mm/mprotect.c
See this upstream merge commit for more details:
52469b4fcd4f Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/mm/memory.c b/mm/memory.c index 1c7501f7fb1a..1f2287eaa88e 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -837,6 +837,8 @@ copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm, | |||
837 | */ | 837 | */ |
838 | make_migration_entry_read(&entry); | 838 | make_migration_entry_read(&entry); |
839 | pte = swp_entry_to_pte(entry); | 839 | pte = swp_entry_to_pte(entry); |
840 | if (pte_swp_soft_dirty(*src_pte)) | ||
841 | pte = pte_swp_mksoft_dirty(pte); | ||
840 | set_pte_at(src_mm, addr, src_pte, pte); | 842 | set_pte_at(src_mm, addr, src_pte, pte); |
841 | } | 843 | } |
842 | } | 844 | } |
@@ -3797,15 +3799,21 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
3797 | * space. Kernel faults are handled more gracefully. | 3799 | * space. Kernel faults are handled more gracefully. |
3798 | */ | 3800 | */ |
3799 | if (flags & FAULT_FLAG_USER) | 3801 | if (flags & FAULT_FLAG_USER) |
3800 | mem_cgroup_enable_oom(); | 3802 | mem_cgroup_oom_enable(); |
3801 | 3803 | ||
3802 | ret = __handle_mm_fault(mm, vma, address, flags); | 3804 | ret = __handle_mm_fault(mm, vma, address, flags); |
3803 | 3805 | ||
3804 | if (flags & FAULT_FLAG_USER) | 3806 | if (flags & FAULT_FLAG_USER) { |
3805 | mem_cgroup_disable_oom(); | 3807 | mem_cgroup_oom_disable(); |
3806 | 3808 | /* | |
3807 | if (WARN_ON(task_in_memcg_oom(current) && !(ret & VM_FAULT_OOM))) | 3809 | * The task may have entered a memcg OOM situation but |
3808 | mem_cgroup_oom_synchronize(); | 3810 | * if the allocation error was handled gracefully (no |
3811 | * VM_FAULT_OOM), there is no need to kill anything. | ||
3812 | * Just clean up the OOM state peacefully. | ||
3813 | */ | ||
3814 | if (task_in_memcg_oom(current) && !(ret & VM_FAULT_OOM)) | ||
3815 | mem_cgroup_oom_synchronize(false); | ||
3816 | } | ||
3809 | 3817 | ||
3810 | return ret; | 3818 | return ret; |
3811 | } | 3819 | } |