Re: userspace pagecache management tool

From: Rik van Riel
Date: Sat Mar 03 2007 - 16:31:29 EST


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

I am sick and tired of the "this is hard, let userspace do it" attitude.

Anything you try to do in-kernel will catastrophically screw up some
workloads. You don't have a chance of getting this right.

Any time you follow the directions of one userspace program,
you can screw up others. I suspect that userspace has far
less of a chance of getting it right than the kernel.

ALSA would be a good example of why it is bad to export
tuning knobs directly to userspace - many sound cards have
non-standard names for the volume controls, making it almost
impossible for userspace to present the user with a simple
user interface for tweaking the volume.

You are the kernel. The user just read an entire kernel tree. You face a
binary decision: do you cache that tree or do you not? Your time starts
now. What is your answer?

Lets turn this around.

The user has been accessing the kernel tree over and over
again, for hours on end (compile testing a patch). Along
comes a backup program, that tells you to evict the whole
thing from the cache.

What do you do?

How can you make global policy decisions based on the intent
of one program?

Only the kernel knows the state of the whole system and has
observed the behaviour of all the processes. One process has
no idea what the other processes in the system are doing.

--
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/