Messages in this thread | ![/](/images/icornerl.gif) | | Subject | Re: FEATURE REQUEST: Specific Processor Optimizations on x86 Architecture | From | Andi Kleen <> | Date | Mon, 27 Oct 2003 19:33:01 +0100 |
| |
"J.A. Magallon" <jamagallon@able.es> writes:
> Patch inlined. Credits should go to Zwane Mwaikambo <zwane@linux.realnet.co.sz>. > It adds the corresponding flags for PII) and P4, and in case thei are defined, > the *fence insn are used. > > Included is also one other patch by Zwane, which states that smp_call_function > needs mb() instead of wmb(). > > I use them regularly, so they look safe. Are they really better ? At least they > do not touch any register, like the trick used till now.
The current code also does not touch any register. It has a gcc memory barrier, which is costly, but needed.
The wmb() change is not needed, unless you have an oostore CPU (x86 has ordered writes by default). It probably does not hurt neither though (I do it the same way on x86-64), but also doesn't change anything.
I think overall the patch is a very bad idea because it adds weird CPU dependencies to the image again for very little again If you really want to do this use alternative() and runtime patching. But it's probably not worth the effort - don't do it until you can demonstrate a difference in any benchmark.
-Andi - 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/
| ![\](/images/icornerr.gif) |