mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Using kswapd's scan depth to trigger task kills is inconsistent and unreliable. When memory pressure quickly spikes, the kswapd scan depth trigger fails to kick off Simple LMK fast enough, causing severe lag. Additionally, kswapd could stop scanning prematurely before reaching the desired scan depth to trigger Simple LMK, which could also cause stalls. To remedy this, use the vmpressure framework instead, since it provides more consistent and accurate readings on memory pressure. This is not very tunable though, so remove CONFIG_ANDROID_SIMPLE_LMK_AGGRESSION. Triggering Simple LMK to kill when the reported memory pressure is 100 should yield good results on all setups. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by: azrim <mirzaspc@gmail.com>
19 lines
368 B
C
19 lines
368 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2019-2020 Sultan Alsawaf <sultan@kerneltoast.com>.
|
|
*/
|
|
#ifndef _SIMPLE_LMK_H_
|
|
#define _SIMPLE_LMK_H_
|
|
|
|
struct mm_struct;
|
|
|
|
#ifdef CONFIG_ANDROID_SIMPLE_LMK
|
|
void simple_lmk_mm_freed(struct mm_struct *mm);
|
|
#else
|
|
static inline void simple_lmk_mm_freed(struct mm_struct *mm)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif /* _SIMPLE_LMK_H_ */
|