lkml.org 
[lkml]   [2003]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.039 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site