lkml.org 
[lkml]   [2003]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][2.5] smp_call_function_mask
Alan wrote:

>On Fri, 2003-01-17 at 05:18, Zwane Mwaikambo wrote:
>> + /* Wait for response */
>> + while (atomic_read(&data.started) != num_cpus)
>> + barrier();
>
>Only old old intel x86 that does -bad- things as it
>generates a lot of bus locked cycles. Better to do
>
> while(atomic_read(&data.started) != num_cpus)
> while(data.started.value != num_cpus)
> {
> barrier();
> cpu_relax();
> }
>
>I would think ?
>
>
>
from 2.5.52, <asm-i386/atomic.h>
#define atomic_read(v) ((v)->counter)
AFAIK atomic_read never contained locked bus cycles.

Btw, Zwane, what about removing non_atomic from the prototype?

--
Manfred

-
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-03-22 13:32    [W:0.220 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site