From: Joel Schopp <jschopp@austin.ibm.com>
To: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Linux Hotplug Memory Support <lhms-devel@lists.sourceforge.net>,
linux-mm <linux-mm@kvack.org>
Subject: Re: [Patch] New zone ZONE_EASY_RECLAIM take 3. (change build_zonelists)[3/5]
Date: Thu, 15 Dec 2005 16:09:55 -0600 [thread overview]
Message-ID: <43A1E9B3.7050203@austin.ibm.com> (raw)
In-Reply-To: <20051210194021.482A.Y-GOTO@jp.fujitsu.com>
> @@ -1602,12 +1606,16 @@ static int __init build_zonelists_node(p
> static inline int highest_zone(int zone_bits)
> {
> int res = ZONE_NORMAL;
> - if (zone_bits & (__force int)__GFP_HIGHMEM)
> - res = ZONE_HIGHMEM;
> - if (zone_bits & (__force int)__GFP_DMA32)
> - res = ZONE_DMA32;
> +
> if (zone_bits & (__force int)__GFP_DMA)
> res = ZONE_DMA;
> + if (zone_bits & (__force int)__GFP_DMA32)
> + res = ZONE_DMA32;
> + if (zone_bits & (__force int)__GFP_HIGHMEM)
> + res = ZONE_HIGHMEM;
> + if (zone_bits & (__force int)__GFP_EASY_RECLAIM)
> + res = ZONE_EASY_RECLAIM;
> +
> return res;
> }
>
These look to come in the wrong order here. You want ZONE_EASY_RECLAIM to be
the highest zone, but this puts HIGHMEM, DMA32, and DMA ahead of it. It in fact
seems to get the order exactly backward.
> Index: zone_reclaim/include/linux/gfp.h
> ===================================================================
> --- zone_reclaim.orig/include/linux/gfp.h 2005-12-06 14:12:43.000000000 +0900
> +++ zone_reclaim/include/linux/gfp.h 2005-12-06 14:12:44.000000000 +0900
> @@ -80,7 +80,7 @@ struct vm_area_struct;
>
> static inline int gfp_zone(gfp_t gfp)
> {
> - int zone = GFP_ZONEMASK & (__force int) gfp;
> + int zone = fls(GFP_ZONEMASK & (__force int) gfp);
> BUG_ON(zone >= GFP_ZONETYPES);
> return zone;
> }
>
Does this have endian issues? I'm not too familiar with it.
--
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-12-15 22:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-10 11:02 Yasunori Goto
2005-12-15 22:09 ` Joel Schopp [this message]
2005-12-16 2:00 ` Yasunori Goto
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=43A1E9B3.7050203@austin.ibm.com \
--to=jschopp@austin.ibm.com \
--cc=lhms-devel@lists.sourceforge.net \
--cc=linux-mm@kvack.org \
--cc=y-goto@jp.fujitsu.com \
/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