diff options
author | Rebecca Schultz Zavin <rebecca@android.com> | 2010-08-27 14:46:33 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2010-10-13 14:17:52 -0700 |
commit | af10d3359bb57f45284dc293d6a16be12881028c (patch) | |
tree | 9641220a8d247b1bf03ae783a6335e748fc9b2e1 /drivers/staging | |
parent | 2105e072fb2bebc0a1a690a46419de7820f33e1a (diff) |
Revert "staging: android: lowmemkiller: Substantially reduce overhead during reclaim"
This reverts commit db0c96452e4c9e2f14e54f1fa648d90ef894bcc6.
Conflicts:
drivers/staging/android/lowmemorykiller.c
Change-Id: Iac522ffa3f751d4ef8d2fb2e0f2e08dee8e6b118
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/android/lowmemorykiller.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index 1ab3fe1f3ce7..1670a9729931 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c @@ -34,8 +34,6 @@ #include <linux/mm.h> #include <linux/oom.h> #include <linux/sched.h> -#include <linux/profile.h> -#include <linux/notifier.h> static uint32_t lowmem_debug_level = 2; static int lowmem_adj[6] = { @@ -53,32 +51,12 @@ static size_t lowmem_minfree[6] = { }; static int lowmem_minfree_size = 4; -static struct task_struct *lowmem_deathpending; - #define lowmem_print(level, x...) \ do { \ if (lowmem_debug_level >= (level)) \ printk(x); \ } while (0) -static int -task_notify_func(struct notifier_block *self, unsigned long val, void *data); - -static struct notifier_block task_nb = { - .notifier_call = task_notify_func, -}; - -static int -task_notify_func(struct notifier_block *self, unsigned long val, void *data) -{ - struct task_struct *task = data; - if (task == lowmem_deathpending) { - lowmem_deathpending = NULL; - task_handoff_unregister(&task_nb); - } - return NOTIFY_OK; -} - static int lowmem_shrink(struct shrinker *s, int nr_to_scan, gfp_t gfp_mask) { struct task_struct *p; @@ -93,18 +71,6 @@ static int lowmem_shrink(struct shrinker *s, int nr_to_scan, gfp_t gfp_mask) int other_free = global_page_state(NR_FREE_PAGES); int other_file = global_page_state(NR_FILE_PAGES); - /* - * If we already have a death outstanding, then - * bail out right away; indicating to vmscan - * that we have nothing further to offer on - * this pass. - * - * Note: Currently you need CONFIG_PROFILING - * for this to work correctly. - */ - if (lowmem_deathpending) - return 0; - if (lowmem_adj_size < array_size) array_size = lowmem_adj_size; if (lowmem_minfree_size < array_size) @@ -176,15 +142,6 @@ static int lowmem_shrink(struct shrinker *s, int nr_to_scan, gfp_t gfp_mask) lowmem_print(1, "send sigkill to %d (%s), adj %d, size %d\n", selected->pid, selected->comm, selected_oom_adj, selected_tasksize); - /* - * If CONFIG_PROFILING is off, then task_handoff_register() - * is a nop. In that case we don't want to stall the killer - * by setting lowmem_deathpending. - */ -#ifdef CONFIG_PROFILING - lowmem_deathpending = selected; - task_handoff_register(&task_nb); -#endif force_sig(SIGKILL, selected); rem -= selected_tasksize; } |