Patch for optimize context switch

Paul Mackerras paulus at linuxcare.com
Tue Feb 22 10:12:59 EST 2000


On Mon, 21 Feb 2000, FASSINO Jean-Philippe wrote:

> The aim of this patch is to optimize context switch on PPC.
> It permit to optimize pipeline and reduce near 30 instructions per
> context switch.
> I'm using it on my computer and it work well, please test it !

Interesting.  How much does it reduce the context switch time?  Did you
run lmbench or something to see if it makes it go faster?

The reason I ask is that it is possible that unrolling the loop as you
have done could actually make it go slower due to increased i-cache
misses.  The bdnz instruction on PPC has essentially zero overhead since it
is pulled out of the instruction stream in the fetch/decode unit by the
branch processing unit.  Also, it is very easy to predict whether a bdnz
will branch or not.

--
Paul Mackerras, Senior Open Source Researcher, Linuxcare, Inc.
+61 2 6262 8990 tel, +61 2 6262 8991 fax
paulus at linuxcare.com.au, http://www.linuxcare.com.au/
Linuxcare.  Support for the revolution.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list