Re: Linux killed Kenny, bastard!

From: Evgeniy Polyakov
Date: Tue Jan 13 2009 - 17:04:19 EST


Hi.

On Wed, Jan 14, 2009 at 01:35:36AM +0900, KOSAKI Motohiro (kosaki.motohiro@xxxxxxxxxxxxxx) wrote:
> > + /*
> > + * We did not find the process with requested string in its name,
> > + * so lets search for the usual victim.
> > + */
> > + if (name && !chosen) {
> > + name = NULL;
> > + goto again;
> > + }
> > +
> > return chosen;
>
> this patch makes oom handling slower.
> slow bad process selection cause next another out of memory.
>
> then, your trouble become large.

It really does not. As I described, when task does not have a valid
name, all checks are skipped.

So effectively it equals to the additional check in the loop, which
although being non-zero, but really is very small, since most of the
time process does not match and only single letter of the name should be
checked.

--
Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/