Messages in this thread | | | Date | Sat, 5 Jul 2003 11:43:08 -0700 | From | Andrew Morton <> | Subject | Re: 2.5.74-mm1 |
| |
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/
| |