[PATCH v5] introduce macro spin_event_timeout()
    Timur Tabi 
    timur at freescale.com
       
    Wed Mar 11 11:22:28 EST 2009
    
    
  
On Tue, Mar 10, 2009 at 6:59 PM, Benjamin Herrenschmidt
<benh at kernel.crashing.org> wrote:
> And ? We can disagree with Alan...
If you guys want to argue with Alan on lkml, please go ahead.  I could
use the support.
Alan did have one valid point though.  Determining how long to loop
for is architecture-specific.  Using jiffies is bad, because even one
jiffy is too long.  Adding a udelay() inside the loop means that it
only checks he condition every microsecond.  So the real solution is
to use keep looping until a certain amount of time has passed.  This
means using an architecture-specific timebase register.
Now we can create a generic version of the function that uses jiffies,
and then arch-specific versions where possible.  But Alan still needs
to be convinced.  I already posted a length rebuttal to his email, but
I haven't gotten a reply yet.
-- 
Timur Tabi
Linux kernel developer at Freescale
    
    
More information about the Linuxppc-dev
mailing list