mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] add cpu_relax to hrtimer_cancel
@ 2006-04-03 18:00 Joe Korty
  2006-04-03 21:13 ` Thomas Gleixner
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Korty @ 2006-04-03 18:00 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar; +Cc: linux-kernel


Add a cpu_relax() to the hand-coded spinwait in hrtimer_cancel().

Signed-off-by: Joe Korty <joe.korty@ccur.com>


 2.6.17-rc1-jak/kernel/hrtimer.c |    1 +
 1 file changed, 1 insertion(+)

diff -puNa kernel/hrtimer.c~add.cpu_relax.to.hrtimer_cancel kernel/hrtimer.c
--- 2.6.17-rc1/kernel/hrtimer.c~add.cpu_relax.to.hrtimer_cancel	2006-04-03 13:40:05.000000000 -0400
+++ 2.6.17-rc1-jak/kernel/hrtimer.c	2006-04-03 13:41:06.000000000 -0400
@@ -501,6 +501,7 @@ int hrtimer_cancel(struct hrtimer *timer
 
 		if (ret >= 0)
 			return ret;
+		cpu_relax();
 	}
 }
 

_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] add cpu_relax to hrtimer_cancel
  2006-04-03 18:00 [PATCH] add cpu_relax to hrtimer_cancel Joe Korty
@ 2006-04-03 21:13 ` Thomas Gleixner
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2006-04-03 21:13 UTC (permalink / raw)
  To: joe.korty; +Cc: Ingo Molnar, linux-kernel

On Mon, 2006-04-03 at 14:00 -0400, Joe Korty wrote:
> Add a cpu_relax() to the hand-coded spinwait in hrtimer_cancel().
> 
> Signed-off-by: Joe Korty <joe.korty@ccur.com>
> 
> 
>  2.6.17-rc1-jak/kernel/hrtimer.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff -puNa kernel/hrtimer.c~add.cpu_relax.to.hrtimer_cancel kernel/hrtimer.c
> --- 2.6.17-rc1/kernel/hrtimer.c~add.cpu_relax.to.hrtimer_cancel	2006-04-03 13:40:05.000000000 -0400
> +++ 2.6.17-rc1-jak/kernel/hrtimer.c	2006-04-03 13:41:06.000000000 -0400
> @@ -501,6 +501,7 @@ int hrtimer_cancel(struct hrtimer *timer
>  
>  		if (ret >= 0)
>  			return ret;
> +		cpu_relax();
>  	}
>  }
>  
> 
> _

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Doh. It had been there once ..:)



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-03 21:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-03 18:00 [PATCH] add cpu_relax to hrtimer_cancel Joe Korty
2006-04-03 21:13 ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®