lkml.org 
[lkml]   [2003]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/13] use cpu_relax() in busy loop
From
Date
On Fri, 2003-09-19 at 01:27, Chris Wright wrote:
> [PATCH 2/13] use cpu_relax() in busy loop
>
> Replace busy loop nop with cpu_relax().
>
> ===== drivers/atm/fore200e.c 1.19 vs edited =====
> --- 1.19/drivers/atm/fore200e.c Tue Sep 2 11:07:59 2003
> +++ edited/drivers/atm/fore200e.c Thu Sep 18 10:42:17 2003
> @@ -248,7 +248,8 @@
> fore200e_spin(int msecs)
> {
> unsigned long timeout = jiffies + MSECS(msecs);
> - while (time_before(jiffies, timeout));
> + while (time_before(jiffies, timeout))
> + cpu_relax();
> }


ehmmm how about making this use mdelay instead ?
(not to speak of maybe making it sleep, but that's a less obvious
transformation)
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.080 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site