From: mel@skynet.ie (Mel Gorman)
To: Christoph Lameter <clameter@sgi.com>
Cc: Lee.Schermerhorn@hp.com, ak@suse.de,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 2/6] Use one zonelist that is filtered instead of multiple zonelists
Date: Tue, 21 Aug 2007 09:51:47 +0100 [thread overview]
Message-ID: <20070821085147.GB29794@skynet.ie> (raw)
In-Reply-To: <Pine.LNX.4.64.0708171355580.9635@schroedinger.engr.sgi.com>
On (17/08/07 13:59), Christoph Lameter didst pronounce:
> On Fri, 17 Aug 2007, Mel Gorman wrote:
>
> > +/* Returns the first zone at or below highest_zoneidx in a zonelist */
> > +static inline struct zone **first_zones_zonelist(struct zonelist *zonelist,
> > + enum zone_type highest_zoneidx)
> > +{
> > + struct zone **z;
> > + for (z = zonelist->zones; zone_idx(*z) > highest_zoneidx; z++);
> > + return z;
> > +}
>
> The formatting above is a bit confusing. Add requires empty lines and put
> the ; on a separate line.
>
>
> > +/* Returns the next zone at or below highest_zoneidx in a zonelist */
> > +static inline struct zone **next_zones_zonelist(struct zone **z,
> > + enum zone_type highest_zoneidx)
> > +{
> > + for (++z; zone_idx(*z) > highest_zoneidx; z++);
>
> Looks weird too.
>
> ++z on an earlier line and then
>
> for ( ; zone_idx(*z) ...)
>
> ?
>
Ok, the relevant section now looks like
+/* Returns the first zone at or below highest_zoneidx in a zonelist */
+static inline struct zone **first_zones_zonelist(struct zonelist *zonelist,
+ enum zone_type highest_zoneidx)
+{
+ struct zone **z;
+
+ for (z = zonelist->zones;
+ zone_idx(*z) > highest_zoneidx;
+ z++)
+ ;
+
+ return z;
+}
+
+/* Returns the next zone at or below highest_zoneidx in a zonelist */
+static inline struct zone **next_zones_zonelist(struct zone **z,
+ enum zone_type highest_zoneidx)
+{
+ /* Advance to the next zone in the zonelist */
+ z++;
+
+ /* Find the next suitable zone to use for the allocation */
+ for (; zone_idx(*z) > highest_zoneidx; z++)
+ ;
+
+ return z;
+}
Is that better?
--
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-08-21 8:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-17 20:16 [PATCH 0/6] Use one zonelist per node instead of multiple zonelists v4 Mel Gorman
2007-08-17 20:17 ` [PATCH 1/6] Use zonelists instead of zones when direct reclaiming pages Mel Gorman
2007-08-17 20:17 ` [PATCH 2/6] Use one zonelist that is filtered instead of multiple zonelists Mel Gorman
2007-08-17 20:59 ` Christoph Lameter
2007-08-21 8:51 ` Mel Gorman [this message]
2007-08-17 20:17 ` [PATCH 3/6] Embed zone_id information within the zonelist->zones pointer Mel Gorman
2007-08-17 21:02 ` Christoph Lameter
2007-08-21 8:54 ` Mel Gorman
2007-08-17 20:18 ` [PATCH 4/6] Record how many zones can be safely skipped in the zonelist Mel Gorman
2007-08-17 21:03 ` Christoph Lameter
2007-08-21 8:58 ` Mel Gorman
2007-08-17 20:18 ` [PATCH 5/6] Filter based on a nodemask as well as a gfp_mask Mel Gorman
2007-08-17 21:29 ` Christoph Lameter
2007-08-21 9:12 ` Mel Gorman
2007-08-17 20:18 ` [PATCH 6/6] Do not use FASTCALL for __alloc_pages_nodemask() Mel Gorman
2007-08-17 21:07 ` Christoph Lameter
2007-08-18 12:51 ` Andi Kleen
2007-08-21 10:25 ` 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=20070821085147.GB29794@skynet.ie \
--to=mel@skynet.ie \
--cc=Lee.Schermerhorn@hp.com \
--cc=ak@suse.de \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.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