[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080702165941.3817.KOSAKI.MOTOHIRO@jp.fujitsu.com>
Date: Wed, 02 Jul 2008 17:06:25 +0900
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To: Andy Whitcroft <apw@...dowen.org>
Cc: kosaki.motohiro@...fujitsu.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Mel Gorman <mel@....ul.ie>
Subject: Re: [PATCH 2/4] pull out zone cpuset and watermark checks for reuse
Hi Andy,
this is nit.
> +/*
> + * Return 1 if this zone is an acceptable source given the cpuset
> + * constraints.
> + */
> +static inline int zone_cpuset_ok(struct zone *zone,
> + int alloc_flags, gfp_t gfp_mask)
> +{
> + if ((alloc_flags & ALLOC_CPUSET) &&
> + !cpuset_zone_allowed_softwall(zone, gfp_mask))
> + return 0;
> + return 1;
> +}
zone_cpuset_ok() seems cpuset sanity check.
but it is "allocatable?" check.
in addition, "ok" is slightly vague name, IMHO.
> +/*
> + * Return 1 if this zone is within the watermarks specified by the
> + * allocation flags.
> + */
> +static inline int zone_alloc_ok(struct zone *zone, int order,
> + int classzone_idx, int alloc_flags, gfp_t gfp_mask)
> +{
> + if (!(alloc_flags & ALLOC_NO_WATERMARKS)) {
> + unsigned long mark;
> + if (alloc_flags & ALLOC_WMARK_MIN)
> + mark = zone->pages_min;
> + else if (alloc_flags & ALLOC_WMARK_LOW)
> + mark = zone->pages_low;
> + else
> + mark = zone->pages_high;
> + if (!zone_watermark_ok(zone, order, mark,
> + classzone_idx, alloc_flags)) {
> + if (!zone_reclaim_mode ||
> + !zone_reclaim(zone, gfp_mask, order))
> + return 0;
> + }
> + }
> + return 1;
> +}
zone_alloc_ok() seems check "allocatable? or not".
So, I like zone_reclaim() go away from its function.
--
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