William Lee Irwin III <wli@holomorphy.com> wrote:
>
> The badness() check isn't good enough. If badness() returns 0 for all
> processes with pid's > 0 and the first one seen is a kernel thread the
> kernel thread will be chosen.
Are we looking at the same code?
static struct task_struct * select_bad_process(void)
{
int maxpoints = 0;
struct task_struct *g, *p;
struct task_struct *chosen = NULL;
do_each_thread(g, p)
if (p->pid) {
int points = badness(p);
if (points > maxpoints) {
chosen = p;
maxpoints = points;
}
if (p->flags & PF_SWAPOFF)
return p;
}
while_each_thread(g, p);
return chosen;
}
if badness() returns zero for everything, this returns NULL and
the kernel panics.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Jul 07 2003 - 22:00:25 EST