Re: [rfc][patch 2/3] x86: fix IO write barriers

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andi Kleen <ak@...>
Cc: Nick Piggin <npiggin@...>, Linux Kernel Mailing List <linux-kernel@...>, Linus Torvalds <torvalds@...>
Date: Thursday, October 4, 2007 - 2:41 pm

On Thu, Oct 04, 2007 at 08:21:59PM +0200, Andi Kleen wrote:
 > On Thursday 04 October 2007 20:10:44 Dave Jones wrote:
 > > On Thu, Oct 04, 2007 at 07:53:16PM +0200, Andi Kleen wrote:
 > >  > 
 > >  > > The only vendor that ever implemented OOSTOREs was Centaur, and they
 > >  > > only did in the Winchip generation of the CPUs.  When they dropped it
 > >  > > from the C3, I asked whether they intended to bring it back, and the
 > >  > > answer was "extremely unlikely".
 > >  > >
 > >  > 
 > >  > Do you know if it made a big performance difference?
 > > 
 > > On the winchip, it was a huge win. I can't remember exact numbers,
 > > but pretty much every benchmark I threw at it at the time showed
 > > significant improvement.
 > 
 > Significant as in >10%?

"Worth about 10-20% performance" according to the 2.4.18pre9-ac4
release notes: http://www.linuxtoday.com/news_story.php3?ltsn=2002-02-14-015-20-NW-KN

 > >  > But yes we should probably just remove this special case to make 
 > >  > maintenance easier.
 > > It's CONFIG_SMP anyway, which none of the winchips were.
 > 
 > It's not.

You're right it isn't now, but Nicks patch seems to change it so that it is.

...

 #ifdef CONFIG_SMP
 #define smp_mb()       mb()
 #define smp_rmb()      rmb()
-#define smp_wmb()      wmb()
+#ifdef CONFIG_X86_OOSTORE
+# define smp_wmb()     wmb()
+#else
+# define smp_wmb()     barrier()
+#endif

 > And we need memory barriers even without SMP 
 > when talking to device drivers. Only the smp_*b()s get noped
 > on UP.

Good point.

	Dave

-- 
http://www.codemonkey.org.uk
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[rfc][patch 1/3] x86_64: fence nontemproal stores, Nick Piggin, (Thu Oct 4, 1:21 am)
[rfc][patch 3/3] x86: optimise barriers, Nick Piggin, (Thu Oct 4, 1:23 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Jarek Poplawski, (Fri Oct 12, 4:25 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Linus Torvalds, (Fri Oct 12, 11:13 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Jarek Poplawski, (Mon Oct 15, 3:44 am)
RE: [rfc][patch 3/3] x86: optimise barriers, David Schwartz, (Mon Oct 15, 10:38 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Nick Piggin, (Mon Oct 15, 4:09 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Jarek Poplawski, (Mon Oct 15, 5:10 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Nick Piggin, (Mon Oct 15, 8:50 pm)
Re: [rfc][patch 3/3] x86: optimise barriers, Jarek Poplawski, (Tue Oct 16, 5:00 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Jarek Poplawski, (Tue Oct 16, 8:49 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Jarek Poplawski, (Mon Oct 15, 5:24 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Nick Piggin, (Fri Oct 12, 4:57 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Jarek Poplawski, (Fri Oct 12, 5:55 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Nick Piggin, (Fri Oct 12, 6:42 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Jarek Poplawski, (Fri Oct 12, 7:55 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Jarek Poplawski, (Fri Oct 12, 8:10 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Helge Hafting, (Fri Oct 12, 4:42 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Jarek Poplawski, (Fri Oct 12, 5:12 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Helge Hafting, (Fri Oct 12, 8:44 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Jarek Poplawski, (Fri Oct 12, 9:29 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Helge Hafting, (Mon Oct 15, 6:17 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Jarek Poplawski, (Mon Oct 15, 7:53 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Nick Piggin, (Fri Oct 12, 5:44 am)
Re: [rfc][patch 3/3] x86: optimise barriers, Jarek Poplawski, (Fri Oct 12, 6:04 am)
[rfc][patch 2/3] x86: fix IO write barriers, Nick Piggin, (Thu Oct 4, 1:22 am)
Re: [rfc][patch 2/3] x86: fix IO write barriers, Dave Jones, (Thu Oct 4, 1:32 pm)
Re: [rfc][patch 2/3] x86: fix IO write barriers, Andi Kleen, (Thu Oct 4, 1:53 pm)
Re: [rfc][patch 2/3] x86: fix IO write barriers, Dave Jones, (Thu Oct 4, 2:10 pm)
Re: [rfc][patch 2/3] x86: fix IO write barriers, Andi Kleen, (Thu Oct 4, 2:21 pm)
Re: [rfc][patch 2/3] x86: fix IO write barriers, Dave Jones, (Thu Oct 4, 2:41 pm)
Re: [rfc][patch 2/3] x86: fix IO write barriers, Andi Kleen, (Thu Oct 4, 2:58 pm)
Re: [rfc][patch 2/3] x86: fix IO write barriers, Dave Jones, (Thu Oct 4, 3:08 pm)
Re: [rfc][patch 2/3] x86: fix IO write barriers, Alan Cox, (Thu Oct 4, 4:52 pm)