Account for extra_free_kbytes in calcuations
CRs-fixed: (CR)
Signed-off-by: Jeff Vanhoof <qjv001@motorola.com>
Change-Id: I2c44a1775d43fad40cf49d6303b7552c2c089b6e
Reviewed-on: https://gerrit.mot.com/
1076213
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Coverity Analysis <coverity@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/
1318719
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
#include <linux/notifier.h>
static u32 lowmem_debug_level = 1;
+extern int extra_free_kbytes;
+
static short lowmem_adj[6] = {
0,
1,
if (lowmem_minfree_size < array_size)
array_size = lowmem_minfree_size;
for (i = 0; i < array_size; i++) {
- minfree = lowmem_minfree[i];
+ minfree = lowmem_minfree[i] +
+ ((extra_free_kbytes * 1024) / PAGE_SIZE);
if (other_free < minfree && other_file < minfree) {
min_score_adj = lowmem_adj[i];
break;