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

From: Rik van Riel
Date: Wed Apr 18 2007 - 16:53:52 EST


àààààà àààààà (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?

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