Re: Bugs and wishes in memory management area

Albert Cahalan (albert@ccs.neu.edu)
Sat, 23 Nov 1996 12:28:08 -0500 (EST)


>>> At work, we use Linux/X/GNU as development system (about 15 linux
>>> stations). 2 megs is probably just enough to load the kernel and
>>> kernel is not pageable.
>>
>> If the machine has enough memory, the kernel should be loaded at
>> the 16 MB mark.
>
> Thats something that was kicked around ages ago.

I think Linus wanted it for some other reason related to
Pentium Pro optimization.

> However it fundamentally changes an assumption used by a lot
> of drivers that their static structures are in DMA space.

Most things can be modules now, so the code should be ready.
If not, perhaps it is still useful to put only the code and
initialized data above 16 MB.

The problem can be solved with a linker hack that puts those
structures in a segment that always loads below 16 MB.

That reminds me, modules need to be loaded into the 4 MB page
used by the rest of the kernel. A second 4 MB page can be used
for ISA DMA and memory mapped IO needs, and a third 4 MB page
can be used for video memory.

>> If not, the memory can be moved as the application locks it.
>> Whenever mlock is called, the memory gets moved above the 16 MB
>> mark before it is actually locked.
>
> What if I want to mlock() for ISA DMA

I don't think you can do that anyway, because an application
can not request DMA memory. Only the kernel can.