Skip to content

Commit 7b9ba0e

Browse files
Panchajanya1999vbajs
authored andcommitted
vmscan: Reduce swapping aggressiveness to 10
Since Android 12, memory management on Androids has been affected significantly, especially on devices with <=4GB RAMs. Multitasking on default settings was a horror and introducing custom Low Memory Killers like SLMK did no much improvements. Introduction of MGLRU seems to have relaxed this situation and now apps don't get killed randomly. Instead, they get swapped to zRAM aggressively. In such situation, reducing swappiness parameter seems to have helped alot in multitasking and it seems fluid now. Test: on normal usage, keep 5-6 apps and use them in repeat. Outcome: none of them gets killed or swapped on in a short epoch, while 60% still stays in memory after 7 hours idling. Signed-off-by: Panchajanya1999 <kernel@panchajanya.dev> [vbajs: Resolve conflicts with oplus mm hacks] Signed-off-by: Yahya Wessam <yahyawessam2002@gmail.com>
1 parent 2a6e7e3 commit 7b9ba0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/vmscan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ struct scan_control {
167167
/*
168168
* From 0 .. 100. Higher means more swappy.
169169
*/
170-
int vm_swappiness = 100;
170+
int vm_swappiness = 10;
171171
#ifdef CONFIG_OPLUS_MM_HACKS
172172
/*
173173
* Direct reclaim swappiness, values range from 0 .. 60. Higher means more swappy.

0 commit comments

Comments
 (0)