From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965040AbWDHWsX (ORCPT ); Sat, 8 Apr 2006 18:48:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965045AbWDHWsX (ORCPT ); Sat, 8 Apr 2006 18:48:23 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:26534 "EHLO ogre.sisk.pl") by vger.kernel.org with ESMTP id S965040AbWDHWsW (ORCPT ); Sat, 8 Apr 2006 18:48:22 -0400 From: "Rafael J. Wysocki" To: Pavel Machek Subject: Re: Userland swsusp failure (mm-related) Date: Sun, 9 Apr 2006 00:47:16 +0200 User-Agent: KMail/1.9.1 Cc: Fabio Comolli , linux-kernel@vger.kernel.org, Nick Piggin References: <200604081716.31836.rjw@sisk.pl> <20060408161555.GA1722@elf.ucw.cz> In-Reply-To: <20060408161555.GA1722@elf.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604090047.17372.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Saturday 08 April 2006 18:15, Pavel Machek wrote: > > > This is my first (and unique) failure since I began testing uswsusp > > > (2.6.17-rc1 version). It happened (I think) because more than 50% of > > > physical memory was occupied at suspend time (about 550 megs out og > > > 1G) and that was what I was trying to test. After freeing some memory > > > suspend worked (there was no need to reboot). > > > > Well, it looks like we didn't free enough RAM for suspend in this case. > > Unfortunately we were below the min watermark for ZONE_NORMAL and > > we tried to allocate with GFP_ATOMIC (Nick, shouldn't we fall back to > > ZONE_DMA in this case?). > > > > I think we can safely ignore the watermarks in swsusp, so probably > > we can set PF_MEMALLOC for the current task temporarily and reset > > it when we have allocated memory. Pavel, what do you think? > > Seems little hacky but okay to me. > > Should not fixing "how much to free" computation to free a bit more be > enough to handle this? Yes, but in that case we'll leave some memory unused. ;-) Rafael