|
@@ -745,11 +745,11 @@ out:
|
|
|
read_unlock(&tasklist_lock);
|
|
|
|
|
|
/*
|
|
|
- * Give "p" a good chance of killing itself before we
|
|
|
- * retry to allocate memory unless "p" is current
|
|
|
+ * Give the killed threads a good chance of exiting before trying to
|
|
|
+ * allocate memory again.
|
|
|
*/
|
|
|
- if (killed && !test_thread_flag(TIF_MEMDIE))
|
|
|
- schedule_timeout_uninterruptible(1);
|
|
|
+ if (killed)
|
|
|
+ schedule_timeout_killable(1);
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -764,6 +764,5 @@ void pagefault_out_of_memory(void)
|
|
|
out_of_memory(NULL, 0, 0, NULL, false);
|
|
|
clear_system_oom();
|
|
|
}
|
|
|
- if (!test_thread_flag(TIF_MEMDIE))
|
|
|
- schedule_timeout_uninterruptible(1);
|
|
|
+ schedule_timeout_killable(1);
|
|
|
}
|