From owner-freebsd-hackers Thu Jan 4 10:09:53 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA20709 for hackers-outgoing; Thu, 4 Jan 1996 10:09:53 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id KAA20702 for ; Thu, 4 Jan 1996 10:09:49 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id KAA18080; Thu, 4 Jan 1996 10:57:59 -0700 From: Terry Lambert Message-Id: <199601041757.KAA18080@phaeton.artisoft.com> Subject: Re: X for install To: msmith@atrad.adelaide.edu.au (Michael Smith) Date: Thu, 4 Jan 1996 10:57:59 -0700 (MST) Cc: terry@lambert.org, gibbs@freefall.freebsd.org, phk@critter.tfs.com, jkh@time.cdrom.com, obrien@cs.ucdavis.edu, freebsd-hackers@FreeBSD.org In-Reply-To: <199601040210.MAA09725@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Jan 4, 96 12:40:56 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.org Precedence: bulk > > You need a distinction between low persistance (probe code, etc.), > > medium persistance (buffer pool allocations), and high persistance > > (kernel and non-transient modules) memory objects to prevent serious > > fragmentation in an autoload process. > > Why? You load a driver, it sets up whatever it needs in terms of buffers, > and then probes. If the probe succeeds, you attach it, if it fails, you > throw it all out. > > The problem with fragmentation is in autodiscard, not autoload. I agree. How do you fix it? Typically, I'd say either PIC the code or put drivers in their own per driver address space. The "easiest" would be to load them, map them into a "probe space", call from "kernel space" to "probe space", and on a hit (where you will keep the driver) remap into "kernel space", unmapping from "probe". Still doesn't resolve the "I/O vs. non-I/O memory" for ISA DMA, but its a good start. To do the other, you'd need to relocate the pages as well as remapping them. The private address space has the advantage of isolating potentially nasty ("scribble on the kernel") drivers, and the disadvantage of additional protection domain crossing (ala NetWare 4.x "memory protection"). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.