Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287427
b: refs/heads/master
c: e5d7965
h: refs/heads/master
i:
  287425: 714a69e
  287423: 72452ef
v: v3
  • Loading branch information
Arve Hjønnevåg authored and Greg Kroah-Hartman committed Feb 8, 2012
1 parent ece9167 commit 76760c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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: 9545f86e3a3b6fac508dd43638d633d1a1567c26
refs/heads/master: e5d7965f88a3755b2d0c54768a17032ab3a72819
5 changes: 4 additions & 1 deletion trunk/drivers/staging/android/lowmemorykiller.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ static size_t lowmem_minfree[6] = {
static int lowmem_minfree_size = 4;

static struct task_struct *lowmem_deathpending;
static unsigned long lowmem_deathpending_timeout;

#define lowmem_print(level, x...) \
do { \
Expand Down Expand Up @@ -103,7 +104,8 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
* Note: Currently you need CONFIG_PROFILING
* for this to work correctly.
*/
if (lowmem_deathpending)
if (lowmem_deathpending &&
time_before_eq(jiffies, lowmem_deathpending_timeout))
return 0;

if (lowmem_adj_size < array_size)
Expand Down Expand Up @@ -178,6 +180,7 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
*/
#ifdef CONFIG_PROFILING
lowmem_deathpending = selected;
lowmem_deathpending_timeout = jiffies + HZ;
task_handoff_register(&task_nb);
#endif
force_sig(SIGKILL, selected);
Expand Down

0 comments on commit 76760c1

Please sign in to comment.