On Mon 19-09-16 09:01:06, Michal Hocko wrote: > On Sun 18-09-16 14:18:22, Linus Torvalds wrote: [...] > > I'm not saying the code should fail and return NULL either, of course. > > > > So PAGE_ALLOC_COSTLY_ORDER should *not* mean "oom rather than return > > NULL". It really has to mean "try a _lot_ harder". > > Agreed and Vlastimil's patches go that route. We just do not try > sufficiently hard with the compaction. And just to clarify why I think that Vlastimil's patches might help here. Your allocation fails because you seem to be hitting min watermark even for order-0 with my workaround which is sitting in 4.8. If this is a longer term state then the compaction even doesn't try to do anything. With the original should_compact_retry we would keep retrying based on compaction_withdrawn() feedback. That would get us over order-0 watermarks kick the compaction in. Without Vlastimil's patches we could still give up too early due some of the back off heuristic in the compaction code. But most of those should be gone with his patches. So I believe that they should really help here. Maybe there are still some places to look at - I didn't get to fully review his patches (plan to do it this week). So in short the workaround we have in 4.8 currently tried to plug the biggest hole while the situation is not ideal. That's why I originally hoped for the compaction feedback already in 4.8. I fully realize this is a lot of code for late 4.8 cycle, though. So if this turns out to be really critical for 4.8 then what Vlastimil was suggesting in http://lkml.kernel.org/r/6aa81fe3-7f04-78d7-d477-609a7acd351a@xxxxxxx might be another workaround on top. We can even consider completely disable OOM killer for !costly orders. -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>