lkml.org 
[lkml]   [2006]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mm] tasklet_unlock_wait() cpu_relax()
On Wed, Jun 14, 2006 at 09:29:20PM +0200, Andreas Mohr wrote:
> Hi all,
>
> use cpu_relax() here, too (instead of barrier()).
>
> Signed-off-by: Andreas Mohr <andi@lisas.de>
>
>
> diff -urN linux-2.6.17-rc6-mm2.orig/include/linux/interrupt.h linux-2.6.17-rc6-mm2.my/include/linux/interrupt.h
> --- linux-2.6.17-rc6-mm2.orig/include/linux/interrupt.h 2006-06-13 19:28:16.000000000 +0200
> +++ linux-2.6.17-rc6-mm2.my/include/linux/interrupt.h 2006-06-14 20:35:49.000000000 +0200
> @@ -227,7 +227,7 @@
>
> static inline void tasklet_unlock_wait(struct tasklet_struct *t)
> {
> - while (test_bit(TASKLET_STATE_RUN, &(t)->state)) { barrier(); }
> + while (test_bit(TASKLET_STATE_RUN, &(t)->state)) { cpu_relax(); }
> }

While you're at it could you reformat it to proper kernel style, e.g.:

static inline void tasklet_unlock_wait(struct tasklet_struct *t)
{
while (test_bit(TASKLET_STATE_RUN, &t->state))
cpu_relax();
}
-
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: 2006-06-16 15:51    [W:0.573 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site