From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753736Ab0IOAaf (ORCPT ); Tue, 14 Sep 2010 20:30:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60504 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751683Ab0IOAae (ORCPT ); Tue, 14 Sep 2010 20:30:34 -0400 Message-ID: <4C90139A.1080809@redhat.com> Date: Tue, 14 Sep 2010 20:30:18 -0400 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Lightning/1.0b2pre Thunderbird/3.1.2 MIME-Version: 1.0 To: Neil Brown CC: Andrew Morton , KOSAKI Motohiro , Wu Fengguang , KAMEZAWA Hiroyuki , linux-kernel@vger.kernel.org, "linux-mm@kvack.org" Subject: Re: Deadlock possibly caused by too_many_isolated. References: <20100915091118.3dbdc961@notabene> In-Reply-To: <20100915091118.3dbdc961@notabene> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/14/2010 07:11 PM, Neil Brown wrote: > Index: linux-2.6.32-SLE11-SP1/mm/vmscan.c > =================================================================== > --- linux-2.6.32-SLE11-SP1.orig/mm/vmscan.c 2010-09-15 08:37:32.000000000 +1000 > +++ linux-2.6.32-SLE11-SP1/mm/vmscan.c 2010-09-15 08:38:57.000000000 +1000 > @@ -1106,6 +1106,11 @@ static unsigned long shrink_inactive_lis > /* We are about to die and free our memory. Return now. */ > if (fatal_signal_pending(current)) > return SWAP_CLUSTER_MAX; > + if (!(sc->gfp_mask& __GFP_IO)) > + /* Not allowed to do IO, so mustn't wait > + * on processes that might try to > + */ > + return SWAP_CLUSTER_MAX; > } > > /* Close. We must also be sure that processes without __GFP_FS set in their gfp_mask do not wait on processes that do have __GFP_FS set. Considering how many times we've run into a bug like this, I'm kicking myself for not having thought of it :( -- All rights reversed From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with SMTP id 398976B0047 for ; Tue, 14 Sep 2010 20:30:25 -0400 (EDT) Message-ID: <4C90139A.1080809@redhat.com> Date: Tue, 14 Sep 2010 20:30:18 -0400 From: Rik van Riel MIME-Version: 1.0 Subject: Re: Deadlock possibly caused by too_many_isolated. References: <20100915091118.3dbdc961@notabene> In-Reply-To: <20100915091118.3dbdc961@notabene> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: Neil Brown Cc: Andrew Morton , KOSAKI Motohiro , Wu Fengguang , KAMEZAWA Hiroyuki , linux-kernel@vger.kernel.org, "linux-mm@kvack.org" List-ID: On 09/14/2010 07:11 PM, Neil Brown wrote: > Index: linux-2.6.32-SLE11-SP1/mm/vmscan.c > =================================================================== > --- linux-2.6.32-SLE11-SP1.orig/mm/vmscan.c 2010-09-15 08:37:32.000000000 +1000 > +++ linux-2.6.32-SLE11-SP1/mm/vmscan.c 2010-09-15 08:38:57.000000000 +1000 > @@ -1106,6 +1106,11 @@ static unsigned long shrink_inactive_lis > /* We are about to die and free our memory. Return now. */ > if (fatal_signal_pending(current)) > return SWAP_CLUSTER_MAX; > + if (!(sc->gfp_mask& __GFP_IO)) > + /* Not allowed to do IO, so mustn't wait > + * on processes that might try to > + */ > + return SWAP_CLUSTER_MAX; > } > > /* Close. We must also be sure that processes without __GFP_FS set in their gfp_mask do not wait on processes that do have __GFP_FS set. Considering how many times we've run into a bug like this, I'm kicking myself for not having thought of it :( -- All rights reversed -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org