mm: Run ZRAM compaction on automatic compaction

* Subsequent to "mm: compaction: Add automatic compaction mechanism"

Signed-off-by: Forenche <prahul2003@gmail.com>
This commit is contained in:
LibXZR 2021-04-24 23:22:09 +08:00 committed by Forenche
parent 1abc03ae73
commit d5c5d7449d
No known key found for this signature in database
GPG Key ID: 1337D655BAFE85E2

View File

@ -1922,6 +1922,8 @@ static void compact_nodes(void)
compact_node(nid);
}
void zram_compact(void);
static void do_compaction(struct work_struct *work)
{
/* Return early if the screen is on */
@ -1933,6 +1935,9 @@ static void do_compaction(struct work_struct *work)
/* Do full compaction */
compact_nodes();
/* Do ZRAM compaction */
zram_compact();
/* Force compaction timeout */
compaction_forced_timeout = jiffies + msecs_to_jiffies(compaction_timeout_ms);