lkml.org 
[lkml]   [2003]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Dri-devel] [PATCH] cpu_relax whilst in busy-wait loops.
From
Date
On Mon, 2003-08-11 at 15:40, davej@redhat.com wrote: 
> diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/char/drm/gamma_dma.c linux-2.5/drivers/char/drm/gamma_dma.c
> -- bk-linus/drivers/char/drm/gamma_dma.c 2003-05-31 15:58:40.000000000 +0100
> +++ linux-2.5/drivers/char/drm/gamma_dma.c 2003-05-29 14:07:46.000000000 +0100
> @@ -44,9 +44,14 @@ static inline void gamma_dma_dispatch(dr
> drm_gamma_private_t *dev_priv =
> (drm_gamma_private_t *)dev->dev_private;
> mb();
> - while ( GAMMA_READ(GAMMA_INFIFOSPACE) < 2);
> + while ( GAMMA_READ(GAMMA_INFIFOSPACE) < 2)
> + cpu_relax();
> +

[...]

Are you actually using the gamma driver? :) Something like this might be
useful in other drivers as well?


--
Earthling Michel Dänzer \ Debian (powerpc), XFree86 and DRI developer
Software libre enthusiast \ http://svcs.affero.net/rm.php?r=daenzer

-
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 13:47    [W:0.086 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site