public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Free memory starvation in a zone?
@ 2001-08-03 17:25 Jeremy Linton
  2001-08-03 22:29 ` Marcelo Tosatti
  0 siblings, 1 reply; 6+ messages in thread
From: Jeremy Linton @ 2001-08-03 17:25 UTC (permalink / raw)
  To: linux-kernel

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. I imaging that this could be
causing some pretty serious problems since the other zone's pages will only
get recleaimed during a page alloc. Maybe there should be a max number of
pages that can be reclaimed out of any given zone to force this loop to
break? Something like 5 or 10% of the zone?

Any comments?


BTW: I started playing with the page age system when I noticed that it
wasn't very evenly distributed. All the pages in a  tend to fall into one or
two age groups pretty close to PAGE_AGE_START with a significant number of
them often below PAGE_AGE_START.








^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-08-04  6:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-03 17:25 Free memory starvation in a zone? Jeremy Linton
2001-08-03 22:29 ` Marcelo Tosatti
2001-08-04  5:34   ` Mike Galbraith
2001-08-04  4:13     ` Marcelo Tosatti
2001-08-04  5:43     ` Rik van Riel
2001-08-04  6:02       ` Mike Galbraith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox