From owner-freebsd-current@FreeBSD.ORG Sat Apr 19 11:56:58 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BE47437B401 for ; Sat, 19 Apr 2003 11:56:58 -0700 (PDT) Received: from bluejay.mail.pas.earthlink.net (bluejay.mail.pas.earthlink.net [207.217.120.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25ED043FDD for ; Sat, 19 Apr 2003 11:56:58 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0234.cvx22-bradley.dialup.earthlink.net ([209.179.198.234] helo=mindspring.com) by bluejay.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 196xWB-000683-00; Sat, 19 Apr 2003 11:56:56 -0700 Message-ID: <3EA19BAA.C133A3DC@mindspring.com> Date: Sat, 19 Apr 2003 11:55:38 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Lucky Green References: <000501c30682$4e5e64b0$6601a8c0@VAIO650> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4732d032f43f8894759e87bfd9b27906c93caf27dac41a8fd350badd9bab72f9c350badd9bab72f9c cc: freebsd-current@FreeBSD.ORG Subject: Re: Broken memory management on system with no swap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Apr 2003 18:56:59 -0000 Lucky Green wrote: > There appears to be a memory management bug that affects systems without > swap files. Processes are killed off due to the server being "out of > swap space" even though top shows some 800MB of "inactive" memory > available. > > Apr 18 18:13:25 pakastelohi kernel: swap_pager_getswapspace: failed This is generally an attempt to get a swap mapping for backing store for the process. It could be that all your "inactive" memory has been spoken for. > I suspect that for some reason memory listed as "inactive" by top is not > being correctly allocated to new processes when no swapfile is > available, since the errors do not appear until memory listed as "free" > has dropped to about 1.5-3k. If you had provided a traceback, I would guess that this happened as a call from swap_pager_reserve(), as opposed to a call from swap_pager_strategy() or swap_pager_putpages(). This can only happen if you are using an md device; are you using an md device (ramdisk)? If so: cut it out, or make sure the MD_RESERVE bit is not set. Probably the correct thing to do is to remove the reference to swap_pager_reserve() in md (and make it use the abstract interface) and remove the reference to swap_pager_putpages() in default_pager.c default_pager_putpages() (and make it use the abstract interface *). * All other references in the system are made through struct pagerops element dereferences. If you are using md, you could probably get away with replacing the swap pager reference with a phys pager reference; same for the default pager's reference. You might even want to consider making the pagertab[] a result of a linker set, instead of a statically declared thing in vm_pager.c, and making the swap_pager completely optional to the system... -- Terry