lkml.org 
[lkml]   [2008]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/11] Add generic helpers for arch IPI function calls
Jeremy Fitzhardinge wrote:
> 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.

I just felt it was silly to do a bigger test if it wasn't necessary.
Even on a 4096 CPU box it's probably barely noticeable, but if it adds
cost then I'd be in favor of keeping the slightly faster version. Maybe
it would be worth doing a branched version, one for
NR_CPUS <= BITS_PER_LONG and one for the other case?

Cheers,
Jes



\
 
 \ /
  Last update: 2008-04-28 09:41    [W:0.079 / U:0.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site