From owner-cvs-all Mon Jan 7 15:41:32 2002 Delivered-To: cvs-all@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id CBA2037B400; Mon, 7 Jan 2002 15:41:18 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id g07Nf5c56040; Mon, 7 Jan 2002 15:41:05 -0800 (PST) (envelope-from dillon) Date: Mon, 7 Jan 2002 15:41:05 -0800 (PST) From: Matthew Dillon Message-Id: <200201072341.g07Nf5c56040@apollo.backplane.com> To: Garance A Drosihn Cc: Wilko Bulte , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/release/sysinstall install.c label.c sysinstall.h References: <200201070759.g077xUt53167@freefall.freebsd.org> <20020107141759.B9972@freebie.xs4all.nl> <200201071715.g07HFb312872@apollo.backplane.com> <20020107185251.A10846@freebie.xs4all.nl> <200201072034.g07KYPI54890@apollo.backplane.com> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :... :that it will result in too little disk space for the other partitions. :I imagine that deciding on a good algorithm will be more work than :implementing it once it's decided upon... :-) : :Is 'available_space' the size of the entire available partition? I'm :thinking it should be something like: : : non-swap partitions should get at LEAST as much as they would : have gotten under the previous calculation : then the maximum size of the swap partition should be some : fraction of the space left after subtracting that amount : from the total size of the partition. : then after getting the size for the swap-partition defined, go : back and calculate sizes for non-swap partitions. : :This is based on about 47 seconds of thought, so it wouldn't surprise me :if there's a better algorithm... : :-- :Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu This is too complex. The current code sets the scaling range for swap from 1/2 physical memory to 2x physical memory (swap capped at 4G). Obviously in this case it was not able to generate an auto-partition even at the smallest scale. Try changing the nominal from 1/2 physical memory to 1/8 physical memory. Patch enclosed. This may still cause the other partitions to wind up being too small in your particular case, though. -Matt Index: label.c =================================================================== RCS file: /home/ncvs/src/release/sysinstall/Attic/label.c,v retrieving revision 1.98.2.7 diff -u -r1.98.2.7 label.c --- label.c 7 Jan 2002 07:59:30 -0000 1.98.2.7 +++ label.c 7 Jan 2002 23:40:17 -0000 @@ -1204,7 +1204,7 @@ def = SWAP_MIN_SIZE * ONE_MEG; if (def > SWAP_AUTO_LIMIT_SIZE * ONE_MEG) def = SWAP_AUTO_LIMIT_SIZE * ONE_MEG; - nom = (int)(physmem / 512) / 2; + nom = (int)(physmem / 512) / 8; sz = nom + (def - nom) * perc / 100; } swap_chunk = Create_Chunk_DWIM(label_chunk_info[here].c->disk, To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message