Revert "staging: android: lowmemorykiller: Remove bitrotted codepath"
authorRebecca Schultz Zavin <rebecca@android.com>
Fri, 27 Aug 2010 21:44:14 +0000 (14:44 -0700)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:33:50 +0000 (16:33 -0700)
This reverts commit d3cf24cfefda01d1dfcafd63fe1f6e6179908878.

drivers/staging/android/lowmemorykiller.c

index 8b67ac06e4b0b222ec80f9998287aafb5e71ea06..57da5f4613b36749f63589413a696f7cf6a2a4cd 100644 (file)
@@ -164,6 +164,12 @@ static int lowmem_shrink(struct shrinker *s, int nr_to_scan, gfp_t gfp_mask)
                             p->pid, p->comm, oom_adj, tasksize);
        }
        if (selected) {
+               if (fatal_signal_pending(selected)) {
+                       pr_warning("process %d is suffering a slow death\n",
+                                  selected->pid);
+                       read_unlock(&tasklist_lock);
+                       return rem;
+               }
                lowmem_print(1, "send sigkill to %d (%s), adj %d, size %d\n",
                             selected->pid, selected->comm,
                             selected_oom_adj, selected_tasksize);