Re: Big mallocs, mmap sorrows and double buffering.

Gideon Glass (gid@cs.wisc.edu)
12 Feb 1997 07:12:16 GMT


Ingo Molnar <mingo@pc5829.hil.siemens.at> writes:

>On Tue, 11 Feb 1997, John Carter wrote:

>> So back to my original question. How do I ask linux kernel how much
>> physical memory I can use without causing thrashing?

>it's rather a question of 'working set', and 'how fast the working set
>changes'.

>admittedly, the current situation for the 'simulatneous large serial
>access' isnt too good, but that can be helped fast, the Linux VM manager
>is very flexible, so just mail to this list if you need something ;)

>the current logic is optimized for the access 'process usage based swapout
>(LRU+priorities) + random swapin' (desktop usage).

>but IMHO sattelite image processing shouldnt be a problem. [maybe some
>large sequential access detection logic should be added ... dont know]

I'm working on something like this. Right now we're doing simulations
from memory reference traces of a bunch of programs. It's easy to
detect when programs do simple sequential access through memory, and
then page out the sequences in MRU fashion (i.e. leave what you can in
memory). For some programs we get performance within 2-3% of optimal
performance (the Belady OPT algorithm -- replace the page accessed the
farthest in the future).

Right now we're finishing a paper (due in two days) but I'll start
hacking this stuff into the kernel shortly thereafter. Hope to have
patches available "soon" after that. In the mean time, if anybody has
any big-memory programs that swap badly that they'd be willing to
offer for benchmarks, I could use a few. (We currently have 16 programs,
about half from SPEC95.)

Gideon Glass