swap: trigger early LMK when swap space is not enough. 07/187507/4
authorByungSoo Kim <bs1770.kim@samsung.com>
Tue, 13 Jun 2017 05:11:40 +0000 (14:11 +0900)
committerPaweł Szewczyk <p.szewczyk@samsung.com>
Mon, 24 Sep 2018 12:58:34 +0000 (14:58 +0200)
commite11de51f3e876d6b083a9fd89d097c1c09c56cbb
tree4ac2bfd749fbc24641f367f5604808e31c649049
parentac3e43e81b624c3c6d6f11916c37a1a234b4eba6
swap: trigger early LMK when swap space is not enough.

If swap device is almost full and there is no improvement to compact zram,
it means that there are many background processes or some process makes memory leak.
It will sometime make a sluggish or hangup issue.
So, it requires to trigger proactive oom killer.
Especially in case of zram, it is necessary to check memory usage of swap cgroup.
If it is enough, trigger reclaiming memory about background applications.
Otherwise, find mallicious process in all memory cgroups.

Change-Id: I14e97f7e1b58545de221ff5cf1a674153d9e98a5
Signed-off-by: ByungSoo Kim <bs1770.kim@samsung.com>
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
src/swap/fileswap.c
src/swap/zramswap.c
src/swap/zswap.c