Re: [patch] oom-5

Rik van Riel (H.H.vanRiel@phys.uu.nl)
Wed, 7 Oct 1998 08:42:22 +0200 (CEST)


On Wed, 7 Oct 1998, Andrea Arcangeli wrote:

> I made a new diff against 2.1.124 that improve some things in my
> last oom patch.

> +#define buffer_under_min() ((buffermem >> PAGE_SHIFT) * 100 < \
> + buffer_mem.min_percent * num_physpages)

This part really makes the VM code more readable. We
should push this into the main kernel right now, IMHO.
Code cleanup is always a good thing...

> if (gfp_mask & __GFP_WAIT)
> + {

Just one problem... Hardly anybody uses __GFP_WAIT anymore,
instead, we let the I/O requests accumulate till we have a
nice amount and then we flush it. Maybe we want to decide
this with a flag (agressive) to try_to_free_pages?

> /*
> + * If we can' t free one page we can' t able to
> + * free tries page. -arca
> + */
> + if (!do_try_to_free_page(0))
> + break;

As I pointed out, this is plain wrong in a lot of
situations. It might work on your machine, but it
definately will fail on a lot of other machines.
This is about the only piece of the patch that I
have real problems with...

Rik.
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+

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