Re: fork: out of memory

Doug Ledford (dledford@dialnet.net)
Sat, 29 Nov 1997 12:44:17 -0600 (CST)


On 29-Nov-97 Theodore Y. Ts'o wrote:
> From: alan@lxorguk.ukuu.org.uk (Alan Cox)
> Date: Sat, 29 Nov 1997 11:39:02 +0000 (GMT)
>
> Firstly there is no real way to say
>
> swap_out(physical_address);
>
> and work back to the virtual addresses and remap the pages.
>
>One of the things which BSD kernels have is an array of structures, one
>structure per page of physical memory, allocated at boot time.
>Obviously, this structure is very small and efficiently utilized, and
>even then it takes up a non-trivial amount of memory. However, it does
>seems to make a number of tasks much easier, since it allows you to go
>back from a physical address to how/where the page is used.
>
>We may want to consider whether having such a structure is useful enough
>to be worth the extra memory space that it takes.

It's probably very much worth it. You really have two situations to
consider. Small memory machines and large memory machines. On small memory
machines this structure would shrink to a smaller size and have less impact.
On large memory machines the structure would be larger but less noticeable
in the overall scheme of things. Then, the advantages of such a structure
could be used. It would make things such as getting DMAable memory on large
memory machines easier (it sucks to have 20MB of free RAM but not be able to
get a buffer for your sound card). It could also be used to improve the
speed and efficiency of the swap mechanism which would help greatly on those
small memory machines.

----------------------------------
E-Mail: Doug Ledford <dledford@dialnet.net>
Date: 29-Nov-97
Time: 12:44:18
----------------------------------