From: Mel Gorman <mel@csn.ul.ie>
To: "Mika Penttilä" <mika.penttila@kolumbus.fi>
Cc: akpm@osdl.org, lhms-devel@lists.sourceforge.net,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] BUG: gfp_zone() not mapping zone modifiers correctly and bad ordering of fallback lists
Date: Sun, 15 Jan 2006 14:00:21 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.58.0601151355040.28172@skynet> (raw)
In-Reply-To: <43C7EDCF.3050402@kolumbus.fi>
On Fri, 13 Jan 2006, Mika Penttilä wrote:
> Mel Gorman wrote:
>
> > Hi Andrew,
> >
> > This patch is divided into two parts and addresses a bug in how zone
> > fallback lists are calculated and how __GFP_* zone modifiers are mapped to
> > their equivilant ZONE_* type. It applies to 2.6.15-mm3 and has been tested
> > on x86 and ppc64. It has been reported by Yasunori Goto that it boots on
> > ia64. Details as follows;
> >
> > build_zonelists() attempts to be smart, and uses highest_zone() so that it
> > doesn't attempt to call build_zonelists_node() for empty zones. However,
> > build_zonelists_node() is smart enough to do the right thing by itself and
> > build_zonelists() already has the zone index that highest_zone() is meant
> > to provide. So, remove the unnecessary function highest_zone().
> >
> > The helper function gfp_zone() assumes that the bits used in the zone
> > modifier
> > of a GFP flag maps directory on to their ZONE_* equivalent and just applies
> > a
> > mask. However, the bits do not map directly and the wrong fallback lists can
> > be used. If unluckly, the system can go OOM when plenty of suitable memory
> > is available. This patch redefines the __GFP_ zone modifier flags to allow
> > a simple mapping to their equivilant ZONE_ type.
> >
> >
> What's the exact failure case? Afaik, we loop though all the GFP_ZONETYPES,
> building the appropriate zone lists at 0 - GFP_ZONETYPES-1 indexes. So the
> direct GFP -> ZONE mapping should do the right thing.
>
It goes wrong if one tries to add a different zone. What is currently
there happens to work, but there seemed to be confusion of when __GFP_
bits were being used or when ZONE_ indices were used.
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
next prev parent reply other threads:[~2006-01-15 14:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-13 15:50 [PATCH] BUG: gfp_zone() not mapping zone modifiers correctly and bad ordering of fallback lists Mel Gorman
2006-01-13 18:13 ` Mika Penttilä
2006-01-15 14:00 ` Mel Gorman [this message]
2006-01-13 20:16 ` Andrew Morton
2006-01-14 2:24 ` Dave Hansen
2006-01-14 18:29 ` Mel Gorman
2006-01-19 21:52 ` [PATCH 1/2] GFP_ZONETYPES add commentry on how to calculate Andy Whitcroft
2006-01-19 21:52 ` [PATCH 2/2] GFP_ZONETYPES calculate from GFP_ZONEMASK Andy Whitcroft
2006-01-16 15:57 ` [PATCH] BUG: gfp_zone() not mapping zone modifiers correctly and bad ordering of fallback lists Andy Whitcroft
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=Pine.LNX.4.58.0601151355040.28172@skynet \
--to=mel@csn.ul.ie \
--cc=akpm@osdl.org \
--cc=lhms-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mika.penttila@kolumbus.fi \
/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;
as well as URLs for NNTP newsgroup(s).