linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* why do we do ALLOC_WMARK_HIGH before going out_of_memory
@ 2016-01-28 16:38 Michal Hocko
  2016-01-28 19:02 ` Andrea Arcangeli
  0 siblings, 1 reply; 10+ messages in thread
From: Michal Hocko @ 2016-01-28 16:38 UTC (permalink / raw)
  To: linux-mm
  Cc: Andrea Argangeli, Mel Gorman, Johannes Weiner, David Rientjes,
	Andrew Morton

Hi,
__alloc_pages_may_oom just after it manages to get oom_lock we try
to allocate once more with ALLOC_WMARK_HIGH target. I was always
wondering why are we will to actually kill something even though
we are above min wmark. This doesn't make much sense to me. I understand
that this is racy because __alloc_pages_may_oom is called after we have
failed to fulfill the WMARK_MIN target but this means WMARK_HIGH
is highly unlikely as well. So either we should use ALLOC_WMARK_MIN
or get rid of this altogether.

The code has been added before git era by
https://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11-rc2/2.6.11-rc2-mm2/broken-out/mm-fix-several-oom-killer-bugs.patch

and it doesn't explain this particular decision. It seems to me that
what ever was the reason back then it doesn't hold anymore.

What do you think?
-- 
Michal Hocko
SUSE Labs 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-01-29 16:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-28 16:38 why do we do ALLOC_WMARK_HIGH before going out_of_memory Michal Hocko
2016-01-28 19:02 ` Andrea Arcangeli
2016-01-28 20:11   ` Michal Hocko
2016-01-28 21:12     ` Johannes Weiner
2016-01-28 21:55       ` Michal Hocko
2016-01-28 23:40         ` Johannes Weiner
2016-01-29 14:38           ` Michal Hocko
2016-01-29 15:56             ` Andrea Arcangeli
2016-01-29 16:12               ` Michal Hocko
2016-01-29 16:29                 ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).