Date: Fri, 02 Jul 1999 02:14:49 +0800 From: Peter Wemm <peter@netplex.com.au> To: Andrew Gallatin <gallatin@cs.duke.edu> Cc: hackers@freebsd.org Subject: Re: npx0 to set maxmem broken in -current? Message-ID: <19990701181449.846AA8A@overcee.netplex.com.au> In-Reply-To: Your message of "Thu, 01 Jul 1999 13:59:32 -0400." <14203.43667.496647.806250@grasshopper.cs.duke.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Andrew Gallatin wrote: > > I have a user with a need to run a machine in varying memory > configurations. The machine has 512MB & she needs to artificially > constrain memory to multiples of 32MB from 32MB to 512MB. (32MB, 64MB, > 96MB, 128MB ...) > > I was planning on having her edit /kernel.config & change the value of > iosize npx0 and have the bootloader do a > > load -t userconfig_script /kernel.config > > at boottime. > > However, this feature appears to be broken in current. The > resource_int_value() call which grabs msize is returning ENOENT & > we're seeing the full 512MB of ram. > > Is there any way around this, short of building her 16 different > kernels? The npx0 tuneing hack has been broken for ages and never worked well anyway. Originally, it depended on dset working, because by the time userconfig ran, memory had already been sized and set up and it was way too late. However, dset would modify the kernel binary so that next time it ran the changes would be available early enough. Now it's even worse since the resource_* routines use the config(8) generated tables (see config.c) until malloc is up and running and then it switches over to using malloc for backing. Personally, I think we should use a kernel environment variable passed in from loader, since kern_envp is available *real early*, from the very beginning of init386(), which is called form locore just after going virtual. It needs a couple of tweaks to get this to work, and in particular, the environment variable will have to override the VM86 calls. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990701181449.846AA8A>