Re: [PATCH] improving oom detection in rmap10c.

Rik van Riel (riel@conectiva.com.br)
Mon, 7 Jan 2002 21:41:18 -0200 (BRST)


On Mon, 7 Jan 2002, Ed Tomlinson wrote:

> I did not think this would solve all the OOM problems.

> Hope your audit discloses other problems.

OK, a silly one in try_to_free_pages(), I think there are some
code paths where we can end up calling the thing, sleeping for
a bit on some lock and then ending up not having to do any work,
because another thread already did this. In that case, 'ret'
will be zero, so I've changed the code below ...

if (!ret)
out_of_memory();

... to the following:

if (!ret && free_low(ALL_ZONES) > 0)
out_of_memory();

This will be part of rmap-11 ;)

regards,

Rik

-- 
Shortwave goes a long way:  irc.starchat.net  #swl

http://www.surriel.com/ http://distro.conectiva.com/

- 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/