lkml.org 
[lkml]   [2005]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Periodically drain non local pagesets
From
Date
On Wed, 2005-06-01 at 10:48 -0700, Christoph Lameter wrote:
> + struct per_cpu_pageset *pset;
> +
> + /* Do not drain local pagesets */
> + if (zone == zone_table[numa_node_id()])
> + continue;
> +

It's best to avoid using NUMA-specific data structures, even in #ifdef
NUMA code. This particular use is incorrect, as the zone_table[] is not
indexed by numa_node_id(), but rather by a combination of the node
number and the zone number (see NODEZONE()).

I'd suggest using something like this:

if (zone->zone_pgdat->node_id == numa_node_id())

It might be nice to have a zone_node_id() macro that hides this as well.
With a macro like that that #defines to 0 when !CONFIG_NUMA, the #ifdef
around that function could probably go away.

Also, are you sure that you need the local_irq_en/disable()?

-- Dave

-
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: 2005-06-01 21:51    [W:0.025 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site