Re: userspace pagecache management tool

From: Rik van Riel
Date: Sat Mar 03 2007 - 20:23:38 EST


Andrew Morton wrote:
On Sat, 03 Mar 2007 19:01:01 -0500 Rik van Riel <riel@xxxxxxxxxx> wrote:

The use-once policy we have in the kernel should work
perfectly fine for backups. All we need to do is
actually honor the accessed bit on active page cache
pages, instead of flushing them onto the inactive
list.

What am I overlooking?

That'll improve backups but will break other things.

To do this effectively we'd need to change the policy so that new pagecache
allocations cause no scanning of used-twice pages at all. So that even
after many gigs of backing up, the working set is still there.

Problem is, (for example) what about the person who has 80% of memory in
used-twice state and who then reads a file or files which are 20% or more of
the size of memory, two or more times. It'll be 100% cache misses, every time.
This will happen quite a lot. IOW, once those pages are in used-twice state,
how does further pagecache activity ever get them _out_ of that state? Only
by joining the used-twice page set, and that can't happen if the used-once-so-far
pages got reclaimed.

Doing a refault thing would help a bit, but stops working at a certain point.

At what point does it stop working?

I am not asking this to be difficult, I just want to get Linux
a VM that does not need to be kludged up every time a distro
ships it to its customers.

I believe one starting point would be a concept that people
cannot shoot holes in any more. That is no guarantee, but
as long as the concept has known holes coding it up is likely
to be a waste of time since the code will need kludges to
deal with the problems later on and we'd be back to square
one.

--
Politics is the struggle between those who want to make their country
the best in the world, and those who believe it already is. Each group
calls the other unpatriotic.
-
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/