[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49A268F1.2020509@cn.fujitsu.com>
Date: Mon, 23 Feb 2009 17:14:25 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: Mel Gorman <mel@....ul.ie>
CC: Linux Memory Management List <linux-mm@...ck.org>,
Pekka Enberg <penberg@...helsinki.fi>,
Rik van Riel <riel@...hat.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Christoph Lameter <cl@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.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>
Subject: Re: [PATCH 07/20] Simplify the check on whether cpusets are a factor
or not
> +#ifdef CONFIG_CPUSETS
> + /* Determine in advance if the cpuset checks will be needed */
> + if ((alloc_flags & ALLOC_CPUSET) && unlikely(number_of_cpusets > 1))
> + alloc_cpuset = 1;
> +#endif
> +
> zonelist_scan:
> /*
> * Scan zonelist, looking for a zone with enough free.
> @@ -1420,8 +1427,8 @@ zonelist_scan:
> if (NUMA_BUILD && zlc_active &&
> !zlc_zone_worth_trying(zonelist, z, allowednodes))
> continue;
> - if ((alloc_flags & ALLOC_CPUSET) &&
> - !cpuset_zone_allowed_softwall(zone, gfp_mask))
> + if (alloc_cpuset)
> + if (!cpuset_zone_allowed_softwall(zone, gfp_mask))
I think you can call __cpuset_zone_allowed_softwall() which won't
check number_of_cpusets, and note you should also define an empty
noop __xxx() for !CONFIG_CPUSETS.
> goto try_next_zone;
>
> if (!(alloc_flags & ALLOC_NO_WATERMARKS)) {
--
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