mm: memcontrol: Add force_reclaim to reclaim tasks' memory in memcg 36/242036/1
authorDongwoo Lee <dwoo08.lee@samsung.com>
Mon, 3 Aug 2020 05:44:43 +0000 (14:44 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Fri, 21 Aug 2020 11:28:41 +0000 (20:28 +0900)
commitcad4c208fb4555786244483ce0f917847677e6ef
tree6fd07f2e080a51584ae355e53da6b515fb5fe535
parenta51d13fed28dc28eb69c575c660c9f1667a0a57f
mm: memcontrol: Add force_reclaim to reclaim tasks' memory in memcg

These days, platforms tend to manage memory on low memory state
like andloid's lowmemory killer. These platforms might want to
reclaim memory from background tasks as well as kill victims
to guarantee free memory at use space level. This patch provides
an interface to reclaim a given memcg. After platform's low memory
handler moves tasks that the platform wants to reclaim to
a memcg and decides how many pages should be reclaimed, it can
reclaim the pages from the tasks by writing the number of pages
at memory.force_reclaim.

Signed-off-by: Hyunhee Kim <hyunhee.kim@xxxxxxxxxxx>
Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
[dwoo08.lee: ported from mailing list https://www.spinics.net/lists/cgroups/msg07874.html]

Change-Id: I40b1322dfe2628ca306690a15958881b3026606f
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
mm/memcontrol.c