On Thu 30-06-16 19:51:53, Tetsuo Handa wrote: > Michal Hocko wrote: [...] > > I have changed that to cmpxchg because lowmemory killer is called > > outside of oom_lock. > > Android's lowmemory killer is no longer using mark_oom_victim(). You are right! The mmotm tree doesn't have the patch because it was routed via Greg. I will probably keep the cmpxchg, though, because it it less error prone and doesn't add much... [...] > By the way, are you going to fix use_mm() race? Currently, we don't wake up > OOM reaper if some kernel thread is holding a reference to that mm via > use_mm(). But currently we can hit > > (1) OOM killer fails to find use_mm() users using for_each_process() in > oom_kill_process() and wakes up OOM reaper. > > (2) Some kernel thread calls use_mm(). > > (3) OOM reaper ignores use_mm() users and reaps that mm. > > race. I think we need to make use_mm() fail after mark_oom_victim() is called. Considering it would matter only for the vhost which I would like to be oom reaper safe I would prefer to do the later and not treat kthreads special. Thanks! -- 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>