Re: [PATCH] allocation looping + kswapd CPU cycles

Marcelo Tosatti (marcelo@conectiva.com.br)
Thu, 10 May 2001 15:22:57 -0300 (BRT)


On Thu, 10 May 2001, Stephen C. Tweedie wrote:

> Hi,
>
> On Thu, May 10, 2001 at 01:43:46PM -0300, Marcelo Tosatti wrote:
>
> > No. __GFP_FAIL can to try to reclaim pages from inactive clean.
> >
> > We just want to avoid __GFP_FAIL allocations from going to
> > try_to_free_pages().
>
> Why? __GFP_FAIL is only useful as an indication that the caller has
> some magic mechanism for coping with failure.

Hum, not _only_.

Initially I thought about __GFP_FAIL to be used by writeout routines which
want to cluster pages until they can allocate memory without causing any
pressure to the system. Something like this:

while ((page = alloc_page(GFP_FAIL))
add_page_to_cluster(page);

write_cluster();

See?

> There's no other information passed, so a brief call to
> try_to_free_pages is quite appropriate.

This obviously depends on what we decide __GFP_FAIL will be used for.

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