Re: [PATCH] [RFC] Throttle swappiness for interactive tasks

Chris Snook
2007-04-18T17:04:32Z

अभिजित भोपटकर (Abhijit Bhopatkar) wrote:
> The mm structures of interactive tasks are marked and
> the pages belonging to them are never shifted to inactive
> list in lru algorithm. Thus keeping interactive tasks in
> memory as long as possible.
> The interactivity is already determined by schedular so
> we reuse that knowledge to mark the mm structures.
>
> Signed-off-by: Abhijit Bhopatkar <bainonline@gmail.com>
> ---

Lying to the VM doesn't seem like the best way to handle this. A lot of tasks,
including interactive ones have some/many pages that they touch once during
startup, and don't touch again for a very long time, if ever. We want these
pages swapped out long before the box swaps out the working set of our
non-interactive processes.

I like the general idea of swap priority influenced by scheduler priority, but
if we're going to do that, we should do it in a general way that's independent
of scheduler implementation, so it'll be useful to soft real-time users and
still relevant if (when?) we replace the current scheduler with something else
lacking a special "interactive" flag.

-- Chris