Re: [2.4] 0-order allocation failed

From: Marcelo Tosatti
Date: Thu Oct 07 2004 - 13:53:15 EST


On Thu, Oct 07, 2004 at 08:28:04PM +0200, Gabor Z. Papp wrote:
> * Marcelo Tosatti <marcelo.tosatti@xxxxxxxxxxxx>:
>
> | > > Can you check how much swap space is there available when
> | > > the OOM killer trigger? I bet this is the case.
> | >
> | > The machine doesn't have swap.
> |
> | Well then you're probably facing true OOM.
> |
> | Add some swap.
>
> There is really no way to run 2.4 without swap?

Nope. Any kernel can't. The thing is the system overcommits
memory (it allows applications to allocate more memory than the system
is able to handle).

If there is no place to "save" that memory once you run out of it,
you're dead. Its a physical problem. :)

> I have the same problem with nfsroot and ramdisk based setups after
> 1-2 weeks uptime.

You can try to remove the following lines from mm/vmscan.c::try_to_free_pages_zone()

if (likely(current->pid != 1))
break;
if (!check_classzone_need_balance(classzone))
break;

And disable CONFIG_OOM_KILLER. See if that makes a difference.

What will happen is that the kernel will try to free memory and
never go into the OOM killer. If it can't free memory, the
system will hang forever at certain point.

There's not much to do about it really.

In 2.6 you can decrease swappiness so for it to free pagecache harder,
but its the same game.
-
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/