From: mel@skynet.ie (Mel Gorman)
To: Nicolas Mailhot <nicolas.mailhot@laposte.net>
Cc: Christoph Lameter <clameter@sgi.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
"bugme-daemon@kernel-bugs.osdl.org"
<bugme-daemon@bugzilla.kernel.org>
Subject: Re: [Bug 8464] New: autoreconf: page allocation failure. order:2, mode:0x84020
Date: Fri, 11 May 2007 21:36:11 +0100 [thread overview]
Message-ID: <20070511203610.GA12136@skynet.ie> (raw)
In-Reply-To: <1178908210.4360.21.camel@rousalka.dyndns.org>
On (11/05/07 20:30), Nicolas Mailhot didst pronounce:
> Le vendredi 11 mai 2007 a 19:45 +0200, Nicolas Mailhot a ecrit :
> > Le vendredi 11 mai 2007 a 18:38 +0100, Mel Gorman a ecrit :
>
> > > so I'd like to look at the
> > > alternative option with kswapd as well. Could you put that patch back in again
> > > please and try the following patch instead?
> >
> > I'll try this one now (if it applies)
>
> Well it doesn't seem to apply. Are you sure you have a clean tree?
> (I have vanilla mm2 + revert of
> md-improve-partition-detection-in-md-array.patch for another bug)
>
I'm pretty sure I have. I recreated the tree and reverted the same patch as
you and regenerated the diff below. I sent it to myself and it appeared ok
and another automated system was able to use it.
In case it's a mailer problem, the patch can be downloaded from
http://www.csn.ul.ie/~mel/kswapd-minorder.patch . Here is a rediff
against the tree you describe.
Sorry for the confusion.
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.21-mm2-revertmd/include/linux/mmzone.h linux-2.6.21-mm2-kswapdorder/include/linux/mmzone.h
--- linux-2.6.21-mm2-revertmd/include/linux/mmzone.h 2007-05-11 21:16:56.000000000 +0100
+++ linux-2.6.21-mm2-kswapdorder/include/linux/mmzone.h 2007-05-11 21:23:00.000000000 +0100
@@ -499,6 +499,8 @@ typedef struct pglist_data {
void get_zone_counts(unsigned long *active, unsigned long *inactive,
unsigned long *free);
void build_all_zonelists(void);
+int kswapd_order(unsigned int order);
+void set_kswapd_order(unsigned int order);
void wakeup_kswapd(struct zone *zone, int order);
int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
int classzone_idx, int alloc_flags);
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.21-mm2-revertmd/mm/slub.c linux-2.6.21-mm2-kswapdorder/mm/slub.c
--- linux-2.6.21-mm2-revertmd/mm/slub.c 2007-05-11 21:16:57.000000000 +0100
+++ linux-2.6.21-mm2-kswapdorder/mm/slub.c 2007-05-11 21:23:00.000000000 +0100
@@ -2131,6 +2131,7 @@ static struct kmem_cache *kmalloc_caches
static int __init setup_slub_min_order(char *str)
{
get_option (&str, &slub_min_order);
+ set_kswapd_order(slub_min_order);
user_override = 1;
return 1;
}
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.21-mm2-revertmd/mm/vmscan.c linux-2.6.21-mm2-kswapdorder/mm/vmscan.c
--- linux-2.6.21-mm2-revertmd/mm/vmscan.c 2007-05-11 21:16:57.000000000 +0100
+++ linux-2.6.21-mm2-kswapdorder/mm/vmscan.c 2007-05-11 21:23:00.000000000 +0100
@@ -1407,6 +1407,32 @@ out:
return nr_reclaimed;
}
+static unsigned int kswapd_min_order __read_mostly;
+
+/**
+ * set_kswapd_order - Set the minimum order that kswapd reclaims at
+ * @order: The new minimum order
+ *
+ * kswapd normally reclaims at order 0 unless there is a higher-order
+ * allocation under way. However, in some cases, it is known that there
+ * are a minimum order size of general interest such as the SLUB allocator
+ * requiring regular high-order allocations. This allows a minimum order
+ * to be set to that min_free_kbytes is kept at higher orders
+ */
+void set_kswapd_order(unsigned int order)
+{
+ if (order >= MAX_ORDER)
+ return;
+
+ printk(KERN_INFO "kswapd reclaim order set to %d\n", order);
+ kswapd_min_order = order;
+}
+
+int kswapd_order(unsigned int order)
+{
+ return max(kswapd_min_order, order);
+}
+
/*
* The background pageout daemon, started as a kernel thread
* from the init process.
@@ -1450,13 +1476,13 @@ static int kswapd(void *p)
*/
tsk->flags |= PF_MEMALLOC | PF_SWAPWRITE | PF_KSWAPD;
- order = 0;
+ order = kswapd_order(0);
for ( ; ; ) {
unsigned long new_order;
prepare_to_wait(&pgdat->kswapd_wait, &wait, TASK_INTERRUPTIBLE);
- new_order = pgdat->kswapd_max_order;
- pgdat->kswapd_max_order = 0;
+ new_order = kswapd_order(pgdat->kswapd_max_order);
+ pgdat->kswapd_max_order = kswapd_order(0);
if (order < new_order) {
/*
* Don't sleep if someone wants a larger 'order'
@@ -1467,7 +1493,7 @@ static int kswapd(void *p)
if (!freezing(current))
schedule();
- order = pgdat->kswapd_max_order;
+ order = kswapd_order(pgdat->kswapd_max_order);
}
finish_wait(&pgdat->kswapd_wait, &wait);
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
--
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:[~2007-05-11 20:36 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200705102128.l4ALSI2A017437@fire-2.osdl.org>
2007-05-10 21:43 ` Andrew Morton
2007-05-10 21:49 ` Christoph Lameter
2007-05-10 22:06 ` Mel Gorman
2007-05-10 22:11 ` Christoph Lameter
2007-05-10 22:16 ` Mel Gorman
2007-05-10 22:27 ` Christoph Lameter
2007-05-10 22:44 ` Mel Gorman
2007-05-10 22:49 ` Christoph Lameter
2007-05-10 23:00 ` Mel Gorman
2007-05-10 23:01 ` Christoph Lameter
2007-05-11 5:56 ` Nicolas Mailhot
2007-05-11 9:08 ` Mel Gorman
2007-05-11 11:51 ` Nicolas Mailhot
2007-05-11 17:38 ` Mel Gorman
2007-05-11 17:45 ` Nicolas Mailhot
2007-05-11 18:30 ` Nicolas Mailhot
2007-05-11 20:36 ` Mel Gorman [this message]
2007-05-12 8:11 ` Nicolas Mailhot
2007-05-12 16:42 ` Mel Gorman
2007-05-12 18:09 ` Nicolas Mailhot
2007-05-12 18:58 ` Nicolas Mailhot
2007-05-12 19:24 ` Mel Gorman
2007-05-13 8:16 ` Nicolas Mailhot
2007-05-11 17:46 ` Christoph Lameter
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=20070511203610.GA12136@skynet.ie \
--to=mel@skynet.ie \
--cc=akpm@linux-foundation.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nicolas.mailhot@laposte.net \
/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