Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Mar 1997 15:20:08 -0800
From:      David Greenman <dg@root.com>
To:        Terry Lambert <terry@lambert.org>
Cc:        hasty@rah.star-gate.com, hackers@FreeBSD.ORG
Subject:   Re: loadable modules and allocating a big memory segment? 
Message-ID:  <199703212320.PAA10490@root.com>
In-Reply-To: Your message of "Fri, 21 Mar 1997 09:22:17 MST." <199703211622.JAA15806@phaeton.artisoft.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>> >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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703212320.PAA10490>