From: Luigi Semenzato Date: Tue, 14 Feb 2012 19:52:10 +0000 (-0800) Subject: CHROMIUM: fix low-memory notification patch (change Iec1eb499) X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=3cf899952dc03e7bbd1d75f49da324cffebb160d;p=cascardo%2Flinux.git CHROMIUM: fix low-memory notification patch (change Iec1eb499) 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 Reviewed-on: https://gerrit.chromium.org/gerrit/15833 Reviewed-by: Olof Johansson --- diff --git a/include/linux/low-mem-notify.h b/include/linux/low-mem-notify.h index c696c0a2a7ab..27978a37fba2 100644 --- a/include/linux/low-mem-notify.h +++ b/include/linux/low-mem-notify.h @@ -1,6 +1,9 @@ #ifndef _LINUX_LOW_MEM_NOTIFY_H #define _LINUX_LOW_MEM_NOTIFY_H +#include +#include + extern unsigned low_mem_margin_percent; extern unsigned long low_mem_minfree; void low_mem_notify(void); diff --git a/mm/low-mem-notify.c b/mm/low-mem-notify.c index cf708f66658c..985e7ed1d760 100644 --- a/mm/low-mem-notify.c +++ b/mm/low-mem-notify.c @@ -33,7 +33,7 @@ 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; @@ -121,9 +121,7 @@ static ssize_t low_mem_margin_store(struct kobject *kobj, 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);