mm/oom_kill: remove unneeded is_memcg_oom check
Subsystems (2)
PATCH 1/1 mm/oom_kill: remove unneeded is_memcg_oom check
oom_cpuset_eligible is always called when !is_memcg_oom. Remove this unnecessary check.
Signed-off-by Miaohe Lin <[email protected]>
--- mm/oom_kill.c | 3 --- 1 file changed, 3 deletions(-)
mm/oom_kill.c +0 -3
@@ -122,9 +122,6 @@ static bool oom_cpuset_eligible(struct task_struct *start,bool ret = false;const nodemask_t *mask = oc->nodemask; -if (is_memcg_oom (oc)) -return true; -rcu_read_lock ();for_each_thread (start, tsk) {if (mask) {
Signature · 1 line
2.23.0
Quoted 4 lines · Miaohe Lin
oom_cpuset_eligibleis always called when !is_memcg_oom. Remove this unnecessary check.Signed-off-by Miaohe Lin <[email protected]>
Acked-by David Rientjes <[email protected]>
This keeps oom_cpuset_eligible() only in the nodemask eligibility business and memcg criteria remains isolated in its own function.
Quoted 4 lines · Miaohe Lin
oom_cpuset_eligibleis always called when !is_memcg_oom. Remove this unnecessary check.Signed-off-by Miaohe Lin <[email protected]>
Acked-by Michal Hocko <[email protected]>
Thanks!
Quoted 20 lines
--- mm/oom_kill.c | 3 --- 1 file changed, 3 deletions(-)mm/oom_kill.c +0
-3@@ -122,9 +122,6 @@ static bool oom_cpuset_eligible(struct task_struct *start,bool ret = false;const nodemask_t *mask = oc->nodemask; -if (is_memcg_oom (oc)) -return true; -rcu_read_lock ();for_each_thread (start, tsk) {if (mask) {Signature · 1 line
2.23.0
Signature · 2 lines
Michal Hocko SUSE Labs