From owner-freebsd-questions Tue Feb 24 12:16:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA27745 for freebsd-questions-outgoing; Tue, 24 Feb 1998 12:16:53 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mail.iconz.co.nz (mail.iconz.co.nz [202.14.100.36]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA27675 for ; Tue, 24 Feb 1998 12:16:45 -0800 (PST) (envelope-from jonc@pinnacle.co.nz) Received: from news.iconz.co.nz (status.gen.nz [202.14.100.1]) by mail.iconz.co.nz (8.8.7/8.8.7) with ESMTP id JAA234440888351367; Wed, 25 Feb 1998 09:16:07 +1300 (NZDT) Received: (from uucp@localhost) by news.iconz.co.nz (8.8.5/8.8.5) with UUCP id JAA17437; Wed, 25 Feb 1998 09:16:05 +1300 Received: from tui.pinnacle.co.nz (tui.pinnacle.co.nz [202.37.163.3]) by kakapo.pinnacle.co.nz (8.8.8/8.8.8) with ESMTP id JAA16097; Wed, 25 Feb 1998 09:12:14 +1300 (NZDT) Received: from localhost (jonc@localhost) by tui.pinnacle.co.nz (8.8.8/8.8.8) with SMTP id JAA14120; Wed, 25 Feb 1998 09:12:13 +1300 (NZDT) X-Authentication-Warning: tui.pinnacle.co.nz: jonc owned process doing -bs Date: Wed, 25 Feb 1998 09:12:13 +1300 (NZDT) From: Jonathan Chen To: Snob Art Genre cc: questions@FreeBSD.ORG Subject: Re: 2.2.5 keeps crashing . . . please advise. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 23 Feb 1998, Snob Art Genre wrote: > Hello, > My system crashes whenever it runs out of memory. This is > understandable, but I would much prefer that it used the swap partition > I've provided for it instead. There's a required VM patch for 2.2.5R (included below); you'll need to recompile your kernel for it. +-- | Jonathan Chen | --+ ------------------------From John Dyson-------------------------------- Anyone with any problems on 2.2.5 should probably apply the patch below (it might be backwards -- otherwise it is correct.) Index: sys/vm/vm_page.c =================================================================== RCS file: /local/home/ncvs/src/sys/vm/vm_page.c,v retrieving revision 1.69.2.3 retrieving revision 1.69.2.5 diff -C4 -r1.69.2.3 -r1.69.2.5 *** vm_page.c 1997/03/25 04:54:35 1.69.2.3 --- vm_page.c 1997/11/06 04:33:01 1.69.2.5 *************** *** 33,41 **** * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91 ! * $Id: vm_page.c,v 1.69.2.3 1997/03/25 04:54:35 dyson Exp $ */ /* * Copyright (c) 1987, 1990 Carnegie-Mellon University. --- 33,41 ---- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91 ! * $Id: vm_page.c,v 1.69.2.5 1997/11/06 04:33:01 dyson Exp $ */ /* * Copyright (c) 1987, 1990 Carnegie-Mellon University. *************** *** 576,584 **** pq = &vm_page_queues[queue]; TAILQ_REMOVE(pq->pl, m, pageq); --(*pq->cnt); --(*pq->lcnt); ! if ((m->queue - m->pc) == PQ_CACHE) { if ((cnt.v_cache_count + cnt.v_free_count) < (cnt.v_free_reserved + cnt.v_cache_min)) pagedaemon_wakeup(); } --- 576,584 ---- pq = &vm_page_queues[queue]; TAILQ_REMOVE(pq->pl, m, pageq); --(*pq->cnt); --(*pq->lcnt); ! if ((queue - m->pc) == PQ_CACHE) { if ((cnt.v_cache_count + cnt.v_free_count) < (cnt.v_free_reserved + cnt.v_cache_min)) pagedaemon_wakeup(); } *************** *** 599,607 **** int hindex; for(j = 0; j < PQ_L1_SIZE; j++) { for(i = (PQ_L2_SIZE/2) - (PQ_L1_SIZE - 1); ! i >= 0; i -= PQ_L1_SIZE) { hindex = (index + (i+j)) & PQ_L2_MASK; m = TAILQ_FIRST(vm_page_queues[basequeue + hindex].pl); if (m) --- 599,607 ---- int hindex; for(j = 0; j < PQ_L1_SIZE; j++) { for(i = (PQ_L2_SIZE/2) - (PQ_L1_SIZE - 1); ! (i+j) >= 0; i -= PQ_L1_SIZE) { hindex = (index + (i+j)) & PQ_L2_MASK; m = TAILQ_FIRST(vm_page_queues[basequeue + hindex].pl); if (m) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message