On 07/05, Oleg Nesterov wrote: > > > I don't think so. Setting MMF_OOM_REAPED indicates that memory used by that > > mm is already reclaimed by the OOM reaper or by __mmput(). > > Sure, this is clear, > > > mm->mm_users == 0 > > alone does not mean memory used by that mm is already reclaimed. > ^^^^^ > > Of course! I meant that oom_has_pending_mm() can check _both_ mm_users and > MMF_OOM_REAPED and then we do not need to set MMF_OOM_REAPED in exit_mm() path. > > No? OK, perhaps you meant that mm_users == 0 can't help because __mmput() can block after that and thus we should not assume this memory is already reclaimed... So yes this probably needs more thinking. perhaps we can check mm->vma == NULL. > > > Making exit_oom_mm() a no-op for CONFIG_MMU=y would be OK, > > Yes. Not only because this can simplify other changes. I do believe that the less > "oom" hooks we have the better, even if this needs some complications in oom_kill.c. > > For example, this series removes the extra try_to_freeze_tasks() from freeze_processes() > (which is in fact the "oom" hook) and personally I do like this fact. > > And. Of course I am not sure this is possible, but to me it would be very nice > to kill oom_reaper_list altogether if CONFIG_MMU=n. > > 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>