Skip to contentSkip to conversation

oom: decouple mems_allowed from oom_unkillable_task

PATCH Hillf Danton 1 participant 1 message Jun 26, 2019 Memory management

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines · On Wed, 26 Jun 2019 17:18:26 +0800 Michal Hocko wrote:
Quoted 6 lines · Hillf Danton
Quoted 4 lines · On Mon, 24 Jun 2019 14:27:11 -0700 (PDT) Shakeel Butt wrote:
(quoted diff) +0 -0
@@ -1085,7 +1091,8 @@ bool out_of_memory(struct oom_control *oc)
 	check_panic_on_oom(oc, constraint);
 
Quoted 7 lines
Quoted 5 lines

Review bool out_of_memory(struct oom_control *oc) · line 1095

Quoted 4 lines
(quoted diff) +2 -1
 	if (!is_memcg_oom(oc) && sysctl_oom_kill_allocating_task &&
-	    current->mm && !oom_unkillable_task(current, oc->nodemask) &&
+	    current->mm && !oom_unkillable_task(current) &&
+	    has_intersects_mems_allowed(current, oc) &&

For what?

This is explained in the changelog I believe - see the initial section

Correct, Sir.

Quoted 1 line

about the history and motivation for the check. This patch removes it

I'd read that again.

Quoted 2 lines

from oom_unkillable_task so we have to check it explicitly here.

Thank you very much for the light you are casting, Sir.

--
Hillf

Quoted 9 lines
Quoted 5 lines
Quoted 5 lines
(quoted diff) +0 -1
 	    current->signal->oom_score_adj !=3D OOM_SCORE_ADJ_MIN) {
 		get_task_struct(current);
 		oc->chosen =3D current;
--

2.22.0.410.gd8fdbe21b5-goog

--
Michal Hocko
SUSE Labs