Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289184
b: refs/heads/master
c: 1eda516
h: refs/heads/master
v: v3
  • Loading branch information
Paul E. McKenney authored and Greg Kroah-Hartman committed Mar 7, 2012
1 parent fa494ac commit cae85c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c52325ed2984069f893040f6139f0024e7d3b50
refs/heads/master: 1eda5166c7640092f512138be6899d050c3d62ed
14 changes: 7 additions & 7 deletions trunk/drivers/staging/android/lowmemorykiller.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ static int
task_notify_func(struct notifier_block *self, unsigned long val, void *data)
{
struct task_struct *task = data;
if (task == lowmem_deathpending) {

if (task == lowmem_deathpending)
lowmem_deathpending = NULL;
task_handoff_unregister(&task_nb);
}

return NOTIFY_OK;
}

Expand Down Expand Up @@ -175,14 +175,12 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
selected->pid, selected->comm,
selected_oom_score_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.
* If CONFIG_PROFILING is off, then we don't want to stall
* the killer by setting lowmem_deathpending.
*/
#ifdef CONFIG_PROFILING
lowmem_deathpending = selected;
lowmem_deathpending_timeout = jiffies + HZ;
task_handoff_register(&task_nb);
#endif
send_sig(SIGKILL, selected, 0);
rem -= selected_tasksize;
Expand All @@ -200,13 +198,15 @@ static struct shrinker lowmem_shrinker = {

static int __init lowmem_init(void)
{
task_handoff_register(&task_nb);
register_shrinker(&lowmem_shrinker);
return 0;
}

static void __exit lowmem_exit(void)
{
unregister_shrinker(&lowmem_shrinker);
task_handoff_unregister(&task_nb);
}

module_param_named(cost, lowmem_shrinker.seeks, int, S_IRUGO | S_IWUSR);
Expand Down

0 comments on commit cae85c2

Please sign in to comment.