Rik,
what do you think about the attached patch? It increases the effective
priority of a (kernel-) killed process, and initiates a reschedule, so
that it gets selected ASAP. (except if there are RT processes around.)
This should make OOM decisions 'visible' much more quickly.
Ingo
--- linux/kernel/signal.c.orig Mon Oct 9 12:56:45 2000
+++ linux/kernel/signal.c Mon Oct 9 13:00:20 2000
@@ -569,6 +569,14 @@
spin_unlock_irqrestore(&t->sigmask_lock, flags);
return -ESRCH;
}
+ /*
+ * Special case, kernel is forcing SIGKILL.
+ * Decrease signal delivery latency.
+ */
+ if (sig == SIGKILL && (t->policy == SCHED_OTHER)) {
+ t->counter = MAX_COUNTER;
+ current->need_resched = 1;
+ }
if (t->sig->action[sig-1].sa.sa_handler == SIG_IGN)
t->sig->action[sig-1].sa.sa_handler = SIG_DFL;