Date: Tue, 24 Apr 2001 18:55:14 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: arch@freebsd.org Cc: terry@lambert.org Subject: vm/swap_pager.c swap_pager_swap_init() Message-ID: <200104241855.LAA02463@usr08.primenet.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104241855.LAA02463>