lkml.org 
[lkml]   [2004]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [profile] fix timer interrupt livelock on 512x Altix
On Tue, 2004-09-21 at 07:30, William Lee Irwin III wrote:
>> +static void __profile_flip_buffers(void *unused)
>> +{
>> + int cpu = smp_processor_id();
>> +
>> + per_cpu(cpu_profile_flip, cpu) = !per_cpu(cpu_profile_flip, cpu);
>> +}

On Fri, Oct 15, 2004 at 11:46:22AM +1000, Rusty Russell wrote:
> Please: one point of per-cpu vars is that archs can choose to hold the
> per-cpu offset in a reg, and derive smp_processor_id() from that. By
> doing the reverse, manually, you defeat this. How about:
> int *flip = __get_cpu_var(cpu_profile_flip);
> *flip = !*flip;

Proof once more that sustained and repeated exposure to shitty
architectures degrades intelligence. I'll send in a correction shortly.


-- wli
-
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 14:07    [W:0.101 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site