Personally, I'm in idea collection mode for that one. First things first,
from my point of view, our basic replacement policy seems to be broken. The
algorithms seem to be burning too much cpu and not doing enough useful work.
Worse, they seem to have a nasty tendency to livelock themselves, i.e., get
into situations where the mm is doing little other than scanning and
transfering pages from list to list. IMHO, if these things were fixed much
of the 'interactive problem' would go away because reloading the working set
for the mouse, for example, would just take a few milliseconds. If not then
we should take a good hard look at why the desktops have such poor working
set granularity.
Furthermore, approaches that rely on applications touching what they believe
to be their own working sets aren't going to work very well if the mm
incorrectly processes the page reference information, or incorectly balances
it against other things that might be going on, so lets be sure the basics
are working properly. Marcello has the right idea with his attention to
better memory management statistical monitoring. How nice it would be if he
got together with the guy working on the tracing module...
That said, yes, it's good to think about hinting ideas, and maybe bless the
idea of applications 'touching themselves' (yes, the allusion was
intentional).
Here's an idea I just came up with while I was composing this... along the
lines of using unused bandwidth for something that at least has a chance of
being useful. Suppose we come to the end of a period of activity, the
general 'temperature' starts to drop and disks fall idle. At this point we
could consult a history of which currently running processes have been
historically active and grow their working sets by reading in from disk.
Otherwise, the memory and the disk bandwidth is just wasted, right? This we
can do inside the kernel and not require coders to mess up their apps with
hints. Of course, they should still take the time to reengineer them to
reduce the cache footprint.
/me decides to stop spouting and write some code
-- Daniel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/