Re: Free memory starvation in a zone?

Marcelo Tosatti (marcelo@conectiva.com.br)
Fri, 3 Aug 2001 19:29:52 -0300 (BRT)


On Fri, 3 Aug 2001, Jeremy Linton wrote:

> In kreclaimd() there is a nice loop that looks like
>
> for(i = 0; i < MAX_NR_ZONES; i++) {
> zone_t *zone = pgdat->node_zones + i;
> if (!zone->size)
> continue;
>
> while (zone->free_pages < zone->pages_low) {
> struct page * page;
> page = reclaim_page(zone);
> if (!page)
> break;
> __free_page(page);
> }
> }
>
> I was playing around with the page age algorithm when i noticed that it
> appears that the machine will get into a state where the inner loop _NEVER_
> exits the current zone because applications running in that zone are eating
> the memory as fast as it is being freed up.

Normal allocations are going to block giving a chance for kreclaimd to run
(and remember, the loop and the freeing routines are really fast).

Are you sure you're seeing kreclaimd looping too much here ?

I've never seen that, and if I did I would get really really
concerned: we rely on kreclaimd to avoid atomic allocations from failing
in a fragile way.

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