lkml.org 
[lkml]   [2007]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] Embed zone_id information within the zonelist->zones pointer
On Thu, 9 Aug 2007, Mel Gorman wrote:

> }
>
> +#if defined(CONFIG_SMP) && INTERNODE_CACHE_SHIFT > ZONES_SHIFT

Is this necessary? ZONES_SHIFT is always <= 2 so it will work with
any pointer. Why disable this for UP?

> --- linux-2.6.23-rc1-mm2-010_use_zonelist/mm/vmstat.c 2007-08-07 14:45:11.000000000 +0100
> +++ linux-2.6.23-rc1-mm2-015_zoneid_zonelist/mm/vmstat.c 2007-08-09 15:52:12.000000000 +0100
> @@ -365,11 +365,11 @@ void refresh_cpu_vm_stats(int cpu)
> */
> void zone_statistics(struct zonelist *zonelist, struct zone *z)
> {
> - if (z->zone_pgdat == zonelist->zones[0]->zone_pgdat) {
> + if (z->zone_pgdat == zonelist_zone(zonelist->_zones[0])->zone_pgdat) {
> __inc_zone_state(z, NUMA_HIT);
> } else {
> __inc_zone_state(z, NUMA_MISS);
> - __inc_zone_state(zonelist->zones[0], NUMA_FOREIGN);
> + __inc_zone_state(zonelist_zone(zonelist->_zones[0]), NUMA_FOREIGN);
> }
> if (z->node == numa_node_id())
> __inc_zone_state(z, NUMA_LOCAL);

Hmmmm. I hope the compiler does subexpression optimization on

zonelist_zone(zonelist->_zones[0])

Acked-by: Christoph Lameter <clameter@sgi.com>

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

\
 
 \ /
  Last update: 2007-08-09 23:41    [W:0.085 / U:2.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site