[lkml]   [2009]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v4] introduce macro spin_event_timeout()
> Are you talking about the udelay() inside the loop?  If so, I agree
> that this is bad and have removed it in the PowerPC-specific version:

The behaviour you want there is system specific - 10uS is a minimum
politeness value for x86 PCI bus for example.

> rdtsc instruction. In this case, we're not adding arbitrary delays
> into the loop, and we're not using jiffies, but we are
> architecture-dependent.

and not useful

A macro of this form really needs to be able to look like

spin_until_timeout(readb(foo) & 0x80, 30 * HZ) {
/* Maybe do other stuff */

to be more generally useful

 \ /
  Last update: 2009-03-11 18:01    [W:0.058 / U:7.900 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site