swap: control swappiness dynamically
User space can control amount of swap by changing swappiness value.
Resourced swap can have basically two strategies.
- set default swappiness (60) before triggering force reclaim node.
: Setting the value to the force reclaim node means to save memory as much as possilbe.
But, if it has smaller swappiness value, there is no impact.
Therefore, even though it has low swappiness value such as zero,
use default swappiness value (60) before writing node and restore previous value after reclaiming.
- set minimum swappiness in case of swap full
: If swap device is not enough space, trying to swap memory will be overhead.
While resourced triggers early LMK, it should have minimum value.
Change-Id: If3ba566caf41a73bb22620b8e7f2403303a067be
Signed-off-by: ByungSoo Kim <bs1770.kim@samsung.com>
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>