On Saturday 08 April 2006 13:43, Gwenole Beauchesne wrote: > Hi, > > > With those changes in place, the same boot-to-kdm process > > requires only about 570000 translations to be made, and 2 > > cache flushes to happen. Of course the cost is an extra > > 48M of memory use. > > I faced a similar problem in Basilisk II. MacOS 8.x had a tendency to > invalidate the code cache approx. 1000 times per second. My poor > K6-2/300 was suffering a lot. About 45% of the time was dedicated to > compilation of code, and desktop experience was very sluggish. Then, I > came up with a very simple idea I named "lazy cache flush". Performance > increased by 76% and compilation time dropped below 10%, desktop > experience was very smooth. I will give you more contemporary results > hereunder.
Qemu already does this. Initially it does it on a per-page basis (writes to a given physical memory page will invalidate all code on that page), and for frequently contested pages it does more fine-grained locking. x86 doesn't have explicit icache invalidate instructions, the icache is architecturally defined to be coherent after every jump instructions. Paul _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel