On 06/28, Michal Hocko wrote: > > 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. It is, I agree. But this is solveable, I think. If nothing else, we can even do another for_each_thread() loop and report all tasks which use this mm, or we can pass pid/mm tuple. Lets discus this later, this is not that important. > > 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. Agreed, this looks certainly better than what we have now. Although I am not sure I fully understand the details, but it seems that everything would be better anyway ;) Oleg. -- 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>