Messages in this thread Patch in this message | | | Subject | Re: [PATCH 1/2] mm, oom: do not rely on TIF_MEMDIE for memory reserves access | From | Tetsuo Handa <> | Date | Thu, 3 Aug 2017 17:03:20 +0900 |
| |
Michal Hocko wrote: > Look, I really appreciate your sentiment for for nommu platform but with > an absolute lack of _any_ oom reports on that platform that I am aware > of nor any reports about lockups during oom I am less than thrilled to > add a code to fix a problem which even might not exist. Nommu is usually > very special with a very specific workload running (e.g. no overcommit) > so I strongly suspect that any OOM theories are highly academic.
If you believe that there is really no oom report, get rid of the OOM killer completely.
> > All I do care about is to not regress nommu as much as possible. So can > we get back to the proposed patch and updates I have done to address > your review feedback please?
No unless we get rid of the OOM killer if CONFIG_MMU=n.
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 170db4d..e931969 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3312,7 +3312,8 @@ void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...) goto out; /* Exhausted what can be done so it's blamo time */ - if (out_of_memory(&oc) || WARN_ON_ONCE(gfp_mask & __GFP_NOFAIL)) { + if ((IS_ENABLED(CONFIG_MMU) && out_of_memory(&oc)) || + WARN_ON_ONCE(gfp_mask & __GFP_NOFAIL)) { *did_some_progress = 1; /*
| |