From: Nick Piggin <npiggin@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: Nick Piggin <npiggin@suse.de>,
Linux Memory Management <linux-mm@kvack.org>
Subject: [patch 1/9] oom: use unreclaimable info
Date: Fri, 28 Jul 2006 09:20:52 +0200 (CEST) [thread overview]
Message-ID: <20060515210538.30275.44220.sendpatchset@linux.site> (raw)
In-Reply-To: <20060515210529.30275.74992.sendpatchset@linux.site>
__alloc_pages currently starts shooting if page reclaim has failed to free up
swap_cluster_max pages in one run through the priorities. This is not always a
good indicator on its own, so make use of the all_unreclaimable logic as
well: don't consider going OOM until all zones we're interested in are
unreclaimable.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Index: linux-2.6/mm/vmscan.c
===================================================================
--- linux-2.6.orig/mm/vmscan.c
+++ linux-2.6/mm/vmscan.c
@@ -62,6 +62,8 @@ struct scan_control {
int swap_cluster_max;
int swappiness;
+
+ int all_unreclaimable;
};
/*
@@ -925,6 +927,7 @@ static unsigned long shrink_zones(int pr
unsigned long nr_reclaimed = 0;
int i;
+ sc->all_unreclaimable = 1;
for (i = 0; zones[i] != NULL; i++) {
struct zone *zone = zones[i];
@@ -941,6 +944,8 @@ static unsigned long shrink_zones(int pr
if (zone->all_unreclaimable && priority != DEF_PRIORITY)
continue; /* Let kswapd poll it */
+ sc->all_unreclaimable = 0;
+
nr_reclaimed += shrink_zone(priority, zone, sc);
}
return nr_reclaimed;
@@ -1021,6 +1026,9 @@ unsigned long try_to_free_pages(struct z
if (sc.nr_scanned && priority < DEF_PRIORITY - 2)
blk_congestion_wait(WRITE, HZ/10);
}
+ /* top priority shrink_caches still had more to do? don't OOM, then */
+ if (!sc.all_unreclaimable)
+ ret = 1;
out:
for (i = 0; zones[i] != 0; i++) {
struct zone *zone = zones[i];
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-07-28 7:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-28 7:20 [patch 0/9] oom: various fixes and improvements for 2.6.18-rc2 Nick Piggin
2006-07-28 7:20 ` Nick Piggin [this message]
2006-07-28 7:21 ` [patch 2/9] oom: reclaim_mapped on oom Nick Piggin
2006-07-28 7:21 ` [patch 3/9] cpuset: oom panic fix Nick Piggin
2006-07-28 7:29 ` Nick Piggin
2006-07-28 9:06 ` Paul Jackson
2006-07-28 7:21 ` [patch 4/9] oom: cpuset hint Nick Piggin
2006-07-28 9:07 ` Paul Jackson
2006-07-28 7:21 ` [patch 5/9] oom: handle current exiting Nick Piggin
2006-07-28 7:21 ` [patch 6/9] oom: handle oom_disable exiting Nick Piggin
2006-07-28 7:21 ` [patch 7/9] oom: swapoff tasks tweak Nick Piggin
2006-07-28 7:21 ` [patch 8/9] oom: kthread infinite loop fix Nick Piggin
2006-07-28 7:22 ` [patch 9/9] oom: more printk Nick Piggin
2006-07-28 7:44 ` [patch 0/9] oom: various fixes and improvements for 2.6.18-rc2 Andrew Morton
2006-07-28 9:28 ` Nick Piggin
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=20060515210538.30275.44220.sendpatchset@linux.site \
--to=npiggin@suse.de \
--cc=akpm@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox