On Fri, 23 Apr 2010, Nick Piggin wrote: > > The oom killer rewrite attempts to kill current first, if possible, and > > then will panic if panic_on_oom is set before falling back to selecting a > > victim. > > See, this is what we want to avoid. If the user sets panic_on_oom, > it is because they want the system to panic on oom. Not to kill > tasks and try to continue. The user does not know or care in the > slightest about "page fault oom". So I don't know why you think this > is a good idea. > Unless we unify the behavior of panic_on_oom, it would be possible for the architectures that are not converted to using pagefault_out_of_memory() yet using your patch series to kill tasks even if they have OOM_DISABLE set. So, as it sits this second in -mm, the system will still try to kill current first so that all architectures are consistent. Once all architectures use pagefault_out_of_memory(), we can simply add if (sysctl_panic_on_oom) { read_lock(&tasklist_lock); dump_header(NULL, 0, 0, NULL); read_unlock(&tasklist_lock); panic("Out of memory: panic_on_oom is enabled\n"); } to pagefault_out_of_memory(). I simply opted for consistency across all architectures before that was done. > > This is consistent with all other architectures such as powerpc > > that currently do not use pagefault_out_of_memory(). If all architectures > > are eventually going to be converted to using pagefault_out_of_memory() > > Yes, architectures are going to be converted, it has already been > agreed, I dropped the ball and lazily hoped the arch people would do it. > But further work done should be to make it consistent in the right way, > not the wrong way. > Thanks for doing the work and proposing the patchset, there were a couple of patches that looked like it needed a v2, but overall it looked very good. Once they're merged in upstream, I think we can add the panic to pagefault_out_of_memory() in -mm since they'll probably make it to Linus before the oom killer rewrite at the speed we're going here. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>