From owner-freebsd-hackers Fri Mar 21 15:20:12 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id PAA21613 for hackers-outgoing; Fri, 21 Mar 1997 15:20:12 -0800 (PST) Received: from root.com (implode.root.com [198.145.90.17]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA21608 for ; Fri, 21 Mar 1997 15:20:10 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by root.com (8.8.5/8.6.5) with SMTP id PAA10490; Fri, 21 Mar 1997 15:20:08 -0800 (PST) Message-Id: <199703212320.PAA10490@root.com> X-Authentication-Warning: implode.root.com: localhost [127.0.0.1] didn't use HELO protocol To: Terry Lambert cc: hasty@rah.star-gate.com, hackers@FreeBSD.ORG Subject: Re: loadable modules and allocating a big memory segment? In-reply-to: Your message of "Fri, 21 Mar 1997 09:22:17 MST." <199703211622.JAA15806@phaeton.artisoft.com> From: David Greenman Reply-To: dg@root.com Date: Fri, 21 Mar 1997 15:20:08 -0800 Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> >I am thinking about loadable sound drivers and video drivers which require >> >continuous physical memory. >> > >> >In the case of the video drivers we may want to allocate as much as >> >2 megabytes of physical memory. Does current support such a memory >> >allocation scheme? >> >> Memory fragmentation is always a potential problem after the system has >> been up and running awhile, but John has made some changes recently that >> increase the likelihood that a chunk can be found. ...so it should work >> most of the time. > >Plus there is no serious technical obstacle to doing a defrag on >the memory as part of the contiguous allocation mechanism (though >no one has implemented one). > >Effectively, there is no reson why all physical page space can not >be reclaimed, short of the GDT and the currently active LDT, by >simply moving around page data and page table entries. If you want >to get a bit more complicated (using the dword count for the LGDT >caller to callee stack copying), you should be able to move *everything* >around as much as you want. Actually, Terry, you are quite wrong about that. The kernel has many instances where it must temprarily store the physical address of a page - in order to set up DMA descriptors, for example (indeed, in the DMA descriptors themselves), not to mention data structures at the pmap level (PV entries, for example). -DG David Greenman Core-team/Principal Architect, The FreeBSD Project