lkml.org 
[lkml]   [2008]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v2] x86: enable preemption in delay

On Sun, 25 May 2008, Steven Rostedt wrote:

> +
> + /*
> + * It is possible that we moved to another CPU, and
> + * since TSC's are per-cpu we need to calculate
> + * that. The delay must guarantee that we wait "at
> + * least" the amount of time. Being moved to another
> + * CPU could make the wait longer but we just need to
> + * make sure we waited long enough. Rebalance the
> + * counter for this CPU.
> + */
> + if (unlikely(cpu != smp_processor_id())) {
> + cpu = smp_processor_id();
> + rdtscl(bclock);
> + }
> }
> while ((now-bclock) < loops);

BAH! expect version 3. :-p

This was compiled tested.

-- Steve

> preempt_enable();
>


\
 
 \ /
  Last update: 2008-05-25 15:47    [W:1.213 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site