Somehow the low-memory notification patch had a couple of errors,
which couldn't get noticed because the config option was off.
This goes with https://gerrit.chromium.org/gerrit/#change,14635.
BUG=chromium-os:20086
TEST=no test for this change
Change-Id: Ib07af40d87c9ad3889990db9652d173fcd24d5f9
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/15833
Reviewed-by: Olof Johansson <olofj@chromium.org>
#ifndef _LINUX_LOW_MEM_NOTIFY_H
#define _LINUX_LOW_MEM_NOTIFY_H
+#include <linux/stddef.h>
+#include <linux/mm.h>
+
extern unsigned low_mem_margin_percent;
extern unsigned long low_mem_minfree;
void low_mem_notify(void);
static DECLARE_WAIT_QUEUE_HEAD(low_mem_wait);
static atomic_t low_mem_state = ATOMIC_INIT(0);
unsigned low_mem_margin_percent = 10;
-unsigned long low_mem_threshold;
+unsigned long low_mem_minfree;
struct low_mem_notify_file_info {
unsigned long unused;
low_mem_margin_percent = (unsigned int) margin;
/* Precompute as much as possible outside the allocator fast path. */
low_mem_minfree = low_mem_margin_to_minfree(low_mem_margin_percent);
- printk(KERN_INFO "low_mem: setting threshold to %lu\n",
- low_mem_threshold);
-
+ printk(KERN_INFO "low_mem: setting minfree to %lu\n", low_mem_minfree);
return count;
}
LOW_MEM_ATTR(margin);