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

Rik van Riel
2007-04-18T20:53:36Z

अभिजित भोपटकर (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.

Aside from the obvious question of whether the idea is good,
there are some practical problems with your patch:

1) the mm->interactive flag is never cleared, even if the
task stops being interactive

2) what if the interactive tasks use up more memory than
the system has? Will you OOM kill instead of swapping
out part of an interactive task?

3) the scheduler can change its idea about which task is
interactive and which task isn't very rapidly, while
disk IO is very slow - the scheduler's classification
may not be useful on swap timescales

4) a currently completely idle task can still be marked
interactive in the scheduler, even if it has been
idle for days. Such a task is an obvious good
candidate for swapout, isn't it?