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

From: Rik van Riel
Date: Sun May 10 2009 - 16:40:01 EST


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/