mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
The 20 ms delay in the reclaim thread is a hacky fudge factor that can cause Simple LMK to behave wildly differently depending on the circumstances of when it is invoked. When kswapd doesn't get enough CPU time to finish up and go back to sleep within 20 ms, Simple LMK performs superfluous reclaims. This is suboptimal, so make Simple LMK more deterministic by eliminating the delay and instead queuing up reclaim requests from kswapd. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by: azrim <mirzaspc@gmail.com>
23 lines
486 B
C
23 lines
486 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2019 Sultan Alsawaf <sultan@kerneltoast.com>.
|
|
*/
|
|
#ifndef _SIMPLE_LMK_H_
|
|
#define _SIMPLE_LMK_H_
|
|
|
|
struct mm_struct;
|
|
|
|
#ifdef CONFIG_ANDROID_SIMPLE_LMK
|
|
void simple_lmk_decide_reclaim(int kswapd_priority);
|
|
void simple_lmk_mm_freed(struct mm_struct *mm);
|
|
#else
|
|
static inline void simple_lmk_decide_reclaim(int kswapd_priority)
|
|
{
|
|
}
|
|
static inline void simple_lmk_mm_freed(struct mm_struct *mm)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif /* _SIMPLE_LMK_H_ */
|