Re: [PATCH 1/11] Add generic helpers for arch IPI function calls

From: Jeremy Fitzhardinge
Date: Sat Apr 26 2008 - 02:29:04 EST


Jens Axboe wrote:
On Thu, Apr 24 2008, Russell King wrote:
On Tue, Apr 22, 2008 at 08:50:17PM +0200, Jens Axboe wrote:
+ data->csd.func(data->csd.info);
+
+ spin_lock(&data->lock);
+ cpu_clear(cpu, data->cpumask);
+ WARN_ON(data->refs == 0);
+ data->refs--;
+ refs = data->refs;
Probably a silly question, but what does data->refs do that
cpus_empty(data->cpumask) wouldn't do? (as indeed ARM presently does.)

I guess it can be marginally slower for NR_CPUS > BITS_PER_LONG,
otherwise there's absolutely no reason to have a seperate ref counter.

Jes was concerned about scanning bitmasks on a 4096 CPU Altix. I'm not sure its all that important, but a refcount check would definitely be quicker.

J
--
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/