From: Andrea Arcangeli <andrea@suse.de>
To: Kanoj Sarcar <kanoj@google.engr.sgi.com>
Cc: linux-kernel@vger.rutgers.edu, linux-mm@kvack.org
Subject: Re: [RFC] [RFT] [PATCH] memory zone balancing
Date: Mon, 27 Dec 1999 17:06:55 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.10.9912271701220.335-100000@alpha.random> (raw)
In-Reply-To: <199912151950.LAA59879@google.engr.sgi.com>
On Wed, 15 Dec 1999, Kanoj Sarcar wrote:
>- if ((gfp_mask & __GFP_DMA) && !PageDMA(page_map))
>- goto check_table;
>- if (!(gfp_mask & __GFP_HIGHMEM) && PageHighMem(page_map))
>+ if (zone && (page_map->zone != zone))
> goto check_table;
> swap_attempts++;
> /* don't account passes over not DMA pages */
>- if ((gfp_mask & __GFP_DMA) && !PageDMA(page))
>- goto dispose_continue;
>- if (!(gfp_mask & __GFP_HIGHMEM) && PageHighMem(page))
>+ if (zone && (page->zone != zone))
> goto dispose_continue;
> if (PageReserved(page)
> || PageLocked(page)
>- || ((gfp_mask & __GFP_DMA) && !PageDMA(page))
>- || (!(gfp_mask & __GFP_HIGHMEM) && PageHighMem(page)))
>+ || (zone && (page->zone != zone)))
> goto out_failed;
The above changes you proposed will cause you to go oom even if you still
have 16mbyte of pure (ISA-DMA) RAM free in a no-bigmem kernel. With a
bigmem kernel you'll go OOM even if you still have 1giga of memory free.
As I just told you privately in previous email the checks should be a kind
of ">" (or a more complex operation implemented in a function) and not a
"!=".
Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.nl.linux.org/Linux-MM/
next prev parent reply other threads:[~1999-12-27 16:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-15 19:50 Kanoj Sarcar
1999-12-17 7:27 ` Mike Galbraith
1999-12-27 16:00 ` Andrea Arcangeli
1999-12-27 16:06 ` Andrea Arcangeli [this message]
2000-01-04 2:27 ` Kanoj Sarcar
2000-01-04 3:23 ` Rik van Riel
2000-01-04 15:47 ` Rik van Riel
2000-01-06 16:05 ` Ingo Molnar
2000-01-06 15:28 ` David S. Miller
2000-01-06 18:36 ` Kanoj Sarcar
2000-01-06 19:14 ` Rik van Riel
2000-01-04 19:42 Rik van Riel
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=Pine.LNX.4.10.9912271701220.335-100000@alpha.random \
--to=andrea@suse.de \
--cc=kanoj@google.engr.sgi.com \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.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