mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
add page fault pages to list head to avoid be swapped out soon
Change-Id: I6efd6ac17432771baee600d6af8191917104ac27 Signed-off-by: huangzq2 <huangzq2@motorola.com> Reviewed-on: https://gerrit.mot.com/2793884 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
48cb9e0d9c
commit
7735d45448
1 changed files with 2 additions and 1 deletions
|
|
@ -1956,8 +1956,9 @@ static void __move_to_zram(struct zram *zram, u32 index, unsigned long handle,
|
|||
swap_maps_destroy(zram, index);
|
||||
zram_set_handle(zram, index, handle);
|
||||
zram_clear_flag(zram, index, ZRAM_WB);
|
||||
// Moto: add to head to avoid be swapped out soon.
|
||||
if (mcg)
|
||||
swap_sorted_list_add_tail(zram, index, mcg);
|
||||
swap_sorted_list_add(zram, index, mcg);
|
||||
zram_set_flag(zram, index, ZRAM_FROM_HYBRIDSWAP);
|
||||
atomic64_add(size, &zram->stats.compr_data_size);
|
||||
atomic64_inc(&zram->stats.pages_stored);
|
||||
|
|
|
|||
Loading…
Reference in a new issue