Re: [PATCH 2/2]x86: spread tlb flush vector between nodes
From: Andi Kleen
Date: Wed Oct 20 2010 - 03:30:44 EST
Hi Shaohua,
> + if (nr_online_nodes > NUM_INVALIDATE_TLB_VECTORS)
> + nr_node_vecs = 1;
> + else
> + nr_node_vecs = NUM_INVALIDATE_TLB_VECTORS/nr_online_nodes;
Does this build without CONFIG_NUMA? AFAIK nr_online_nodes is only
defined for a numa kernel.
> +
> +static int tlb_cpuhp_notify(struct notifier_block *n,
> + unsigned long action, void *hcpu)
> +{
> + switch (action & 0xf) {
> + case CPU_ONLINE:
> + case CPU_DEAD:
> + calculate_tlb_offset();
I still think the notifier is overkill and a static mapping at boot time
would be fine.
The rest looks ok to me.
-andi
--
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/