lkml.org 
[lkml]   [1999]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: oom() _still_ killing init
On Wed, 16 Jun 1999, Andrea Arcangeli wrote:

> On Wed, 16 Jun 1999, Oliver Xymoron wrote:
>
> >I upgraded from 2.2.5 to 2.2.10-pre-no-way-of-telling-anymore and an out
> >of memory condition[1] killed init again. It would be nice if this weren't
>
> Apply this patch:
....
> void oom(struct task_struct * task)
> {
> + if (task->pid == 1)
> + goto out;
> printk("\nOut of memory for %s.\n", task->comm);
> force_sig(SIGKILL, task);
> + out:
> }

You're kidding. Tell me you're joking, please. This is the most
superfluous use of a goto I've ever seen. There are good reasons not to
use gotos, such as readability, maintainability, reliability, and the
like. While performance may take precedence in schedule (at least until we
make the compiler smarter), the same is certainly not true here.

I haven't looked at the patch you want me to apply this over (I need to
run the stable kernel on this machine) - does it do anything to rectify
the cause of oom() in put_dirty_page()?

--
"Love the dolphins," she advised him. "Write by W.A.S.T.E.."


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

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