From: William Lee Irwin III <wli@holomorphy.com>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, akpm@zip.com.au
Subject: false NUMA OOM
Date: Mon, 16 Sep 2002 19:50:35 -0700 [thread overview]
Message-ID: <20020917025035.GY2179@holomorphy.com> (raw)
Well, there's an obvious problem. shrink_caches() hammers out_of_memory()
when it has only looked at a single node. Something like this might help.
Totally untested. Problem discovered during 2 simultaneous dbench 512's
on separate 12GB tmpfs fs's on a 32x NUMA-Q with 32GB of RAM.
Against 2.5.35.
Bill
--- mm/vmscan.c.orig 2002-09-16 19:02:11.000000000 -0700
+++ mm/vmscan.c 2002-09-16 19:07:50.000000000 -0700
@@ -519,18 +519,24 @@
shrink_caches(struct zone *classzone, int priority,
int gfp_mask, int nr_pages)
{
+ pg_data_t *pgdat;
struct zone *first_classzone;
struct zone *zone;
+ int type;
first_classzone = classzone->zone_pgdat->node_zones;
- zone = classzone;
- while (zone >= first_classzone && nr_pages > 0) {
- if (zone->free_pages <= zone->pages_high) {
- nr_pages = shrink_zone(zone, priority,
- gfp_mask, nr_pages);
+ for (type = classzone - first_classzone; type >= 0; --type)
+ for_each_pgdat(pgdat) {
+ zone = pgdat->node_zones + type;
+ if (!zone->size)
+ continue;
+ if (zone->free_pages <= zone->pages_high)
+ nr_pages = shrink_zone(zone, priority,
+ gfp_mask, nr_pages);
+ if (nr_pages <= 0)
+ return nr_pages;
}
- zone--;
- }
+
return nr_pages;
}
WARNING: multiple messages have this Message-ID (diff)
From: William Lee Irwin III <wli@holomorphy.com>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, akpm@zip.com.au
Subject: false NUMA OOM
Date: Mon, 16 Sep 2002 19:50:35 -0700 [thread overview]
Message-ID: <20020917025035.GY2179@holomorphy.com> (raw)
Well, there's an obvious problem. shrink_caches() hammers out_of_memory()
when it has only looked at a single node. Something like this might help.
Totally untested. Problem discovered during 2 simultaneous dbench 512's
on separate 12GB tmpfs fs's on a 32x NUMA-Q with 32GB of RAM.
Against 2.5.35.
Bill
--- mm/vmscan.c.orig 2002-09-16 19:02:11.000000000 -0700
+++ mm/vmscan.c 2002-09-16 19:07:50.000000000 -0700
@@ -519,18 +519,24 @@
shrink_caches(struct zone *classzone, int priority,
int gfp_mask, int nr_pages)
{
+ pg_data_t *pgdat;
struct zone *first_classzone;
struct zone *zone;
+ int type;
first_classzone = classzone->zone_pgdat->node_zones;
- zone = classzone;
- while (zone >= first_classzone && nr_pages > 0) {
- if (zone->free_pages <= zone->pages_high) {
- nr_pages = shrink_zone(zone, priority,
- gfp_mask, nr_pages);
+ for (type = classzone - first_classzone; type >= 0; --type)
+ for_each_pgdat(pgdat) {
+ zone = pgdat->node_zones + type;
+ if (!zone->size)
+ continue;
+ if (zone->free_pages <= zone->pages_high)
+ nr_pages = shrink_zone(zone, priority,
+ gfp_mask, nr_pages);
+ if (nr_pages <= 0)
+ return nr_pages;
}
- zone--;
- }
+
return nr_pages;
}
--
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.linux-mm.org/
next reply other threads:[~2002-09-17 2:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-17 2:50 William Lee Irwin III [this message]
2002-09-17 2:50 ` false NUMA OOM William Lee Irwin III
2002-09-17 3:17 ` Andrew Morton
2002-09-17 3:17 ` Andrew Morton
2002-09-17 3:29 ` William Lee Irwin III
2002-09-17 3:29 ` William Lee Irwin III
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=20020917025035.GY2179@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.