Re: [PATCH] - Improve SN2 TLB flushing algorithms

From: Christoph Hellwig <hch_at_infradead.org>
Date: 2004-01-29 08:17:59
On Wed, Jan 28, 2004 at 02:59:12PM -0600, Jack Steiner wrote:
> +#ifdef CONFIG_NUMA
> +			cpus_clear(mm->cpu_vm_mask);
> +#endif

I really hate this ifdefs all over the place.  Does this really hurt that
much on non-NUMA systems?  Also SN2 seems to use this code always so
CONFIG_NUMA looks like the wrong ifdef to me.  

> +#ifdef CONFIG_NUMA
> +		if (!cpu_isset(smp_processor_id(), mm->cpu_vm_mask))
> +			cpu_set(smp_processor_id(), mm->cpu_vm_mask);

cpu_test_and_set()?

> +/* When nodemask_t is available, delete the following definitions */
> +#define NODEMASK_WORDCOUNT       ((NR_NODES+(BITS_PER_LONG-1))/BITS_PER_LONG)
> +#define NODE_MASK_ALL    { [0 ... ((NR_NODES+BITS_PER_LONG-1)/BITS_PER_LONG)-1] = ~0UL }
> +#define NODE_MASK_NONE   { [0 ... ((NR_NODES+BITS_PER_LONG-1)/BITS_PER_LONG)-1] = 0 }
> +typedef unsigned long   nodemask_t[NODEMASK_WORDCOUNT];

Don't we have the generic bitmask code merged now?
>
> +	for (i=0, cpu=find_first_bit(&mm->cpu_vm_mask, NR_CPUS); cpu < NR_CPUS;
> +			i++, cpu=find_next_bit(&mm->cpu_vm_mask, NR_CPUS, ++cpu)) {

This assumes a specific cpumask_t implementation.  You should just use
for_each_cpu_mask()

> @@ -218,3 +265,4 @@
>  
>  	sn_send_IPI_phys(physid, vector, delivery_mode);
>  }
> +EXPORT_SYMBOL(sn2_send_IPI);

What's this?

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Jan 28 16:26:15 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:21 EST