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

Pekka Enberg
2009-02-23T13:20:09Z

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@csn.ul.ie>

Looks good to me!