public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jeremy Linton" <jlinton@interactivesi.com>
To: <linux-kernel@vger.kernel.org>
Subject: Free memory starvation in a zone?
Date: Fri, 3 Aug 2001 12:25:35 -0500	[thread overview]
Message-ID: <01fa01c11c41$51462cd0$bef7020a@mammon> (raw)

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.








             reply	other threads:[~2001-08-03 17:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-03 17:25 Jeremy Linton [this message]
2001-08-03 22:29 ` Free memory starvation in a zone? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='01fa01c11c41$51462cd0$bef7020a@mammon' \
    --to=jlinton@interactivesi.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox