[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1240420313.10627.85.camel@nimitz>
Date: Wed, 22 Apr 2009 10:11:53 -0700
From: Dave Hansen <dave@...ux.vnet.ibm.com>
To: Mel Gorman <mel@....ul.ie>
Cc: Linux Memory Management List <linux-mm@...ck.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Christoph Lameter <cl@...ux-foundation.org>,
Nick Piggin <npiggin@...e.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Lin Ming <ming.m.lin@...el.com>,
Zhang Yanmin <yanmin_zhang@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
Pekka Enberg <penberg@...helsinki.fi>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 18/22] Use allocation flags as an index to the zone
watermark
On Wed, 2009-04-22 at 14:53 +0100, Mel Gorman wrote:
> struct zone {
> /* Fields commonly accessed by the page allocator */
> - unsigned long pages_min, pages_low, pages_high;
> + union {
> + struct {
> + unsigned long pages_min, pages_low, pages_high;
> + };
> + unsigned long pages_mark[3];
> + };
Why the union? It's a bit obfuscated for me. Why not just have a
couple of these:
static inline unsigned long zone_pages_min(struct zone *zone)
{
return zone->pages_mark[ALLOC_WMARK_MIN];
}
and s/zone->pages_min/zone_pages_min(zone)/
?
-- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists