|
@@ -2000,7 +2000,7 @@ gotten:
|
|
cow_user_page(new_page, old_page, address, vma);
|
|
cow_user_page(new_page, old_page, address, vma);
|
|
__SetPageUptodate(new_page);
|
|
__SetPageUptodate(new_page);
|
|
|
|
|
|
- if (mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))
|
|
|
|
|
|
+ if (mem_cgroup_newpage_charge(new_page, mm, GFP_HIGHUSER_MOVABLE))
|
|
goto oom_free_new;
|
|
goto oom_free_new;
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -2431,7 +2431,7 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|
lock_page(page);
|
|
lock_page(page);
|
|
delayacct_clear_flag(DELAYACCT_PF_SWAPIN);
|
|
delayacct_clear_flag(DELAYACCT_PF_SWAPIN);
|
|
|
|
|
|
- if (mem_cgroup_try_charge(mm, GFP_KERNEL, &ptr) == -ENOMEM) {
|
|
|
|
|
|
+ if (mem_cgroup_try_charge(mm, GFP_HIGHUSER_MOVABLE, &ptr) == -ENOMEM) {
|
|
ret = VM_FAULT_OOM;
|
|
ret = VM_FAULT_OOM;
|
|
unlock_page(page);
|
|
unlock_page(page);
|
|
goto out;
|
|
goto out;
|
|
@@ -2512,7 +2512,7 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|
goto oom;
|
|
goto oom;
|
|
__SetPageUptodate(page);
|
|
__SetPageUptodate(page);
|
|
|
|
|
|
- if (mem_cgroup_newpage_charge(page, mm, GFP_KERNEL))
|
|
|
|
|
|
+ if (mem_cgroup_newpage_charge(page, mm, GFP_HIGHUSER_MOVABLE))
|
|
goto oom_free_page;
|
|
goto oom_free_page;
|
|
|
|
|
|
entry = mk_pte(page, vma->vm_page_prot);
|
|
entry = mk_pte(page, vma->vm_page_prot);
|
|
@@ -2603,7 +2603,8 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
|
ret = VM_FAULT_OOM;
|
|
ret = VM_FAULT_OOM;
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
- if (mem_cgroup_newpage_charge(page, mm, GFP_KERNEL)) {
|
|
|
|
|
|
+ if (mem_cgroup_newpage_charge(page,
|
|
|
|
+ mm, GFP_HIGHUSER_MOVABLE)) {
|
|
ret = VM_FAULT_OOM;
|
|
ret = VM_FAULT_OOM;
|
|
page_cache_release(page);
|
|
page_cache_release(page);
|
|
goto out;
|
|
goto out;
|