Re: [PATCH -mm] vmscan: make mapped executable pages the first class citizen

Rik van Riel
2009-05-10T20:39:58Z

Alan Cox wrote:

> Make your swap decisions depend upon I/O load on storage devices. Make
> your paging decisions based upon writing and reading large contiguous
> chunks (512K costs the same as 8K pretty much) - but you already know
> that .

Even a 2MB chunk only takes 3x as much time to write to
or read from disk as a 4kB page.

> Historically BSD tackled some of this by actually swapping processes out
> once pressure got very high

Our big problem today usually isn't throughput though,
but latency - the time it takes to bring a previously
inactive application back to life.

If we have any throughput related memory problems,
they often seem to be due to TLB miss penalties.

I believe it is time to start looking into transparent
use of 2MB superpages for anonymous memory (and tmpfs?)
in Linux on x86-64.

I realize the utter horror of all the different corner
cases one can have with those. However, with a careful
design the problems should be manageable and the
advantages are many.

With a reservation based system, populating a 2MB area
4kB at a time until most of the area is in use by one
process (or not), waste can be kept to a minimum.

I guess I'll start with this the same way I started
with the split LRU code - think of all the ways things
could possibly go wrong and come up with a design that
seems mostly impervious to the downsides.

--
All rights reversed.