On Tue, 26 Jul 2011, Michal Hocko wrote: > > After selecting a task to kill, the oom killer iterates all processes and > > kills all other threads that share the same mm_struct in different thread > > groups. It would not otherwise be helpful to kill a thread if its memory > > would not be subsequently freed. > > > > A kernel thread, however, may assume a user thread's mm by using > > use_mm(). This is only temporary and should not result in sending a > > SIGKILL to that kthread. > > Good catch. Have you ever seen this happening? > No, this is just another patch to make the kernel more use_mm()-friendly. Before that capability was introduced, it was possible to assume that a kthread would always have a NULL mm pointer, so it wasn't previously required for this code. > > This patch ensures that only user threads and not kthreads are sent a > > SIGKILL if they share the same mm_struct as the oom killed task. > > > > Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx> > > Reviewed-by: Michal Hocko <mhocko@xxxxxxx> Thanks! -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>