mm-add-a-helper-function-to-check-may-oom-condition.patch removed from -mm tree
Subsystems (4)
[email protected]
maintainerSubject: [merged] mm-add-a-helper-function-to-check-may-oom-condition.patch removed from -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 13 Nov 2013 12:38:05 -0800
The patch titled
Subject: mm: add a helper function to check may oom condition
has been removed from the -mm tree. Its filename was
mm-add-a-helper-function-to-check-may-oom-condition.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Qiang Huang <[email protected]>
Subject: mm: add a helper function to check may oom condition
Use helper function to check if we need to deal with oom condition.
---
include/linux/oom.h | 5 +++++ mm/memcontrol.c | 9 +-------- mm/page_alloc.c | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-)
include/linux/oom.h renamed from include/linux/oom.h~mm-add-a-helper-function-to-check-may-oom-condition +5 -0
@@ -82,6 +82,11 @@ static inline void oom_killer_enable(voi oom_killer_disabled = false; } +static inline bool oom_gfp_allowed (gfp_t gfp_mask) +{ +return (gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY); +} +extern struct task_struct *find_lock_task_mm (struct task_struct *p);/* sysctls */
mm/memcontrol.c renamed from mm/memcontrol.c~mm-add-a-helper-function-to-check-may-oom-condition +1 -8
@@ -2984,21 +2984,14 @@ static int memcg_charge_kmem(struct mem_struct res_counter *fail_res;struct mem_cgroup *_memcg;int ret =0 ; -bool may_oom; ret =res_counter_charge (&memcg->kmem, size, &fail_res);if (ret)return ret; -/* -* Conditions under which we can wait for the oom_killer. Those are -* the same conditions tested by the core page allocator -*/ - may_oom = (gfp & __GFP_FS) && !(gfp & __GFP_NORETRY); - _memcg = memcg; ret =__mem_cgroup_try_charge (NULL , gfp, size >>PAGE_SHIFT , - &_memcg, may_oom); + &_memcg,oom_gfp_allowed (gfp));if (ret == -EINTR ) {/*
mm/page_alloc.c renamed from mm/page_alloc.c~mm-add-a-helper-function-to-check-may-oom-condition +1 -1
@@ -2593,7 +2593,7 @@ rebalance:* running out of options and have to consider going OOM */ if (!did_some_progress) { -if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY)) { +if (oom_gfp_allowed (gfp_mask)) {if (oom_killer_disabled) goto nopage;/* Coredumps can quickly deplete all memory reserves */
_
Patches currently in -mm which might be from [email protected] are
origin.patch