From: Mel Gorman <mel@csn.ul.ie>
To: linux-mm@kvack.org, lhms-devel@lists.sourceforge.net
Cc: Mel Gorman <mel@csn.ul.ie>
Subject: [PATCH 6/8] Fragmentation Avoidance V18: 006_largealloc_tryharder
Date: Fri, 21 Oct 2005 10:57:29 +0100 (IST) [thread overview]
Message-ID: <20051021095728.14409.40590.sendpatchset@skynet.csn.ul.ie> (raw)
In-Reply-To: <20051021095658.14409.26527.sendpatchset@skynet.csn.ul.ie>
Fragmentation avoidance patches increase our chances of satisfying high
order allocations. So this patch takes more than one iteration at trying
to fulfill those allocations because, unlike before, the extra iterations
are often useful.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>
Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>
diff -rup -X /usr/src/patchset-0.5/bin//dontdiff linux-2.6.14-rc4-mm1-005_fallback/mm/page_alloc.c linux-2.6.14-rc4-mm1-006_largealloc_tryharder/mm/page_alloc.c
--- linux-2.6.14-rc4-mm1-005_fallback/mm/page_alloc.c 2005-10-19 22:12:22.000000000 +0100
+++ linux-2.6.14-rc4-mm1-006_largealloc_tryharder/mm/page_alloc.c 2005-10-19 22:13:05.000000000 +0100
@@ -1127,6 +1127,7 @@ __alloc_pages(gfp_t gfp_mask, unsigned i
int do_retry;
int can_try_harder;
int did_some_progress;
+ int highorder_retry = 3;
might_sleep_if(wait);
@@ -1275,7 +1276,17 @@ rebalance:
goto got_pg;
}
- out_of_memory(gfp_mask, order);
+ if (order < MAX_ORDER / 2)
+ out_of_memory(gfp_mask, order);
+
+ /*
+ * Due to low fragmentation efforts, we try a little
+ * harder to satisfy high order allocations and only
+ * go OOM for low-order allocations
+ */
+ if (order >= MAX_ORDER/2 && --highorder_retry > 0)
+ goto rebalance;
+
goto restart;
}
@@ -1292,6 +1303,8 @@ rebalance:
do_retry = 1;
if (gfp_mask & __GFP_NOFAIL)
do_retry = 1;
+ if (order >= MAX_ORDER/2 && --highorder_retry > 0)
+ do_retry = 1;
}
if (do_retry) {
blk_congestion_wait(WRITE, HZ/50);
--
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:[~2005-10-21 9:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-21 9:56 [PATCH 0/8] Fragmentation Avoidance V18 Mel Gorman
2005-10-21 9:57 ` [PATCH 1/8] Fragmentation Avoidance V18: 001_antidefrag_flags Mel Gorman
2005-10-21 9:57 ` [PATCH 2/8] Fragmentation Avoidance V18: 002_usemap Mel Gorman
2005-10-21 9:57 ` [PATCH 3/8] Fragmentation Avoidance V18: 003_fragcore Mel Gorman
2005-10-21 9:57 ` [PATCH 4/8] Fragmentation Avoidance V18: 004_markfree Mel Gorman
2005-10-21 9:57 ` [PATCH 5/8] Fragmentation Avoidance V18: 005_fallback Mel Gorman
2005-10-21 9:57 ` Mel Gorman [this message]
2005-10-21 9:57 ` [PATCH 7/8] Fragmentation Avoidance V18: 007_percpu Mel Gorman
2005-10-21 9:57 ` [PATCH 8/8] Fragmentation Avoidance V18: 008_stats Mel Gorman
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=20051021095728.14409.40590.sendpatchset@skynet.csn.ul.ie \
--to=mel@csn.ul.ie \
--cc=lhms-devel@lists.sourceforge.net \
--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