Re: [PATCH 07/20] Simplify the check on whether cpusets are afactor or not

From: Pekka Enberg
Date: Mon Feb 23 2009 - 08:20:12 EST


Hi Mel,

On Mon, 2009-02-23 at 11:39 +0000, Mel Gorman wrote:
> An #ifdef in a function is ugly all right. Here is a slightly
> different
> version based on your suggestion. Note the definition of number_of_cpusets
> in the !CONFIG_CPUSETS case. I didn't call cpuset_zone_allowed_softwall()
> for the preferred zone in case it wasn't in the cpuset for some reason and
> we incorrectly disabled the cpuset check.
>
> =====
> Simplify the check on whether cpusets are a factor or not
>
> The check whether cpuset contraints need to be checked or not is complex
> and often repeated. This patch makes the check in advance to the comparison
> is simplier to compute.
>
> Signed-off-by: Mel Gorman <mel@xxxxxxxxx>

Looks good to me!

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/