On Mon 27-06-16 23:09:04, Oleg Nesterov wrote: > On 06/27, Michal Hocko wrote: > > > > Yes this is really unfortunate. I am trying to converge to per mm > > behavior as much as possible. We are getting there slowly but not yet > > there. > > Yes, agreed, everything should be per-mm. > > Say wake_oom_reaper/oom_reap_task. It is simply ugly we pass task_struct > to oom_reap_task(), it should work with mm_struct. Again, this is because > of TIF_MEMDIE/exit_oom_victim. Except pr_info(), but this is minor... I was also tempted to get back to the mm based queing but I think that the pr_info is quite useful. Both the back off and the successful reaping can tell us more about how all the machinery works. > > So the flag acts > > both as memory reserve access key and the exclusion. > > Yes, and this should be separeted imo. I would love to. > As for memory reserve access, I feel that we should only set this flag > if task == current... but this needs more discussion. That would certainly be something to discuss. If we have other reliable way to detect the oom victim and when it terminates then TIF_MEMDIE on the current and only for memory reserves would be viable. Let's see whether we can keep the killed mm around and use it as an indicator. This would be a natural follow up cleanup. -- 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>