From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752987Ab0DBSeY (ORCPT ); Fri, 2 Apr 2010 14:34:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9679 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752614Ab0DBSdF (ORCPT ); Fri, 2 Apr 2010 14:33:05 -0400 Date: Fri, 2 Apr 2010 20:30:57 +0200 From: Oleg Nesterov To: David Rientjes , Andrew Morton Cc: anfei , KOSAKI Motohiro , nishimura@mxp.nes.nec.co.jp, KAMEZAWA Hiroyuki , Mel Gorman , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH -mm 0/4] oom: linux has threads Message-ID: <20100402183057.GA31723@redhat.com> References: <20100329112111.GA16971@redhat.com> <20100330154659.GA12416@redhat.com> <20100331175836.GA11635@redhat.com> <20100331204718.GD11635@redhat.com> <20100401135927.GA12460@redhat.com> <20100402111406.GA4432@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100402111406.GA4432@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/02, Oleg Nesterov wrote: > > Once again: > > void *memory_hog_thread(void *arg) > { > for (;;) > malloc(A_LOT); > } > > int main(void) > { > pthread_create(memory_hog_thread, ...); > syscall(__NR_exit, 0); > } > > Now, even if we fix PF_EXITING check, select_bad_process() will always > ignore this process. The group leader has ->mm == NULL. So. Please see the COMPLETELY UNTESTED patches I am sending. They need your review, or feel free to redo these fixes. 4/4 is a bit off-topic. Also, please note the "This patch is not enough" comment in 3/4. Oleg.