lmkd: make lmkd SCHED_FIFO
If kswapd runs more than lmkd it may throw away all page cache pages before lmkd gets a chance to kill a process. Make lmkd SCHED_FIFO so it can react quickly to kernel low memory notifications. Bug: 16236289 Change-Id: I46767b4ec81ef8638d0c9e47d168a68b62e3cac5
This commit is contained in:
parent
b28ff91313
commit
1a0d9be53e
1 changed files with 5 additions and 0 deletions
|
|
@ -748,7 +748,12 @@ static void mainloop(void) {
|
|||
}
|
||||
|
||||
int main(int argc __unused, char **argv __unused) {
|
||||
struct sched_param param = {
|
||||
.sched_priority = 1,
|
||||
};
|
||||
|
||||
mlockall(MCL_FUTURE);
|
||||
sched_setscheduler(0, SCHED_FIFO, ¶m);
|
||||
if (!init())
|
||||
mainloop();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue