From owner-freebsd-arch Tue Apr 24 11:54:56 2001 Delivered-To: freebsd-arch@freebsd.org Received: from smtp05.primenet.com (smtp05.primenet.com [206.165.6.135]) by hub.freebsd.org (Postfix) with ESMTP id 6D46A37B423 for ; Tue, 24 Apr 2001 11:54:54 -0700 (PDT) (envelope-from tlambert@usr08.primenet.com) Received: (from daemon@localhost) by smtp05.primenet.com (8.9.3/8.9.3) id LAA28456; Tue, 24 Apr 2001 11:54:49 -0700 (MST) Received: from usr08.primenet.com(206.165.6.208) via SMTP by smtp05.primenet.com, id smtpdAAAY9aOI3; Tue Apr 24 11:54:43 2001 Received: (from tlambert@localhost) by usr08.primenet.com (8.8.5/8.8.5) id LAA02463; Tue, 24 Apr 2001 11:55:18 -0700 (MST) From: Terry Lambert Message-Id: <200104241855.LAA02463@usr08.primenet.com> Subject: vm/swap_pager.c swap_pager_swap_init() To: arch@freebsd.org Date: Tue, 24 Apr 2001 18:55:14 +0000 (GMT) Cc: terry@lambert.org X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It seems to me that the pages calculation in this function is wrong: /* * Initialize our zone. Right now I'm just guessing on the number * we need based on the number of pages in the system. Each swblock * can hold 16 pages, so this is probably overkill. */ n = cnt.v_page_count * 2; In particular, for a 4G system, it seems that this should be more bounded, e.g.: /* * Provide backing store for only 2*physical memory limit. * This approximately halves the amount of memory otherwise * required in a 4G system, relative to the previous 'n' * calculation. It could probably be reduced by half again. */ n = cnt.v_page_count * 2; n = min(n, 128*1024); /* (4G / PAGE_SIZE) / 16 * 2 */ Irealize that this changes for the Alpha nad IA64, and should be more general, but I haven't found the address space limitation defined anywhere. Comments? Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message