Re: [PATCH/RFC] A method for clearing out page cache

From: Ingo Molnar
Date: Tue Feb 22 2005 - 02:54:28 EST



* Andrew Morton <akpm@xxxxxxxx> wrote:

> > However, the first step is to do this manually from user space.
>
> Yup. The thing is, lots of people want this feature for various
> reasons. Not just numerical-computing-users-on-NUMA. We should get
> it right for them too.
>
> Especially kernel developers, who have various nasty userspace tools
> which will manually reclaim pagecache. But non-kernel-developers will
> use it too, when they think the VM is screwing them over ;)

app designers very frequently think that the VM gets its act wrong (most
of the time for the wrong reasons), and the last thing we want to enable
them is to hack real problems around. How are we supposed to debug VM
problems where one player periodically flushes the whole pagecache? If
that flushing, when disabled, 'results in the app being broken' (_if_
the app gives any option to disable the flushing). Providing APIs to
flush system caches, sysctl or syscall, is the road to VM madness.

If the goal is to override the pagecache (and other kernel caches) on a
given node then for God's sake, think a bit harder. E.g. enable users to
specify an 'allocation priority' of some sort, which kicks out the
pagecache on the local node - or something like that. Giving a
half-assed tool to clean out one aspect of the system caches will only
muddy the waters, with no real road back to sanity.

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