I have a question- does plex cache prescanned pages? perhaps cache
them after converting some things? I mean 90% of all graphics port
code will be something like:

mov al,3c0h 
out al,ah

which could be transtlated to something that generates an exception,
so only some ports would have to, or..... I don't know... and the
pages could be marked R/O so plex could pick up self-modifying
code and not cache it....

Sorry if I'm rambling, but the question is really, does plex cache 
pre-scanned stuff? perhaps this could result in code getting faster
as it goes along, along the lines of transmeta's chips?

Gfunk

http://www.gfunk007.com/
----- Original Message ----- 
From: "Bart Oldeman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 14, 2000 12:14 PM
Subject: Re: [plex86] Progress, turning off prescanning for user code


> On Wed, 13 Dec 2000, Kevin Lawton wrote:
> 
> > Just a quick note on progress of turning off SBE (code prescanning)
> > for user code (ring3).
> > 
> > I've put in the framework for doing this.  Only support it for
> > paging-off for the moment - will fill in for paging-on soon.
> > 
> > I modified the cooperative guest microkernel to test the
> > performance difference with prescanning on and off.  Made
> > the test thrash the living crap out of the SBE code by
> > contantly jumping between pages for no reason.  Maybe not
> > realistic but it makes my numbers look good. :^)  Here's
> > the results.  I used a stopwatch to time how long a number
> > of iterations took:
> > 
> >   with user-code prescanning on ............ 120 seconds
> >   with user-code prescanning off ...........   2 seconds
> > 
> > With user-code prescanning off, code which is doing number
> > crunching etc runs at near native speed. :^)
> 
> Looks very promising! I've done some benchmarking as well:
> 
> to comment on some testing I did and have an excuse for not having vga
> planar VGA video modes (like 640x480x16 colors) speed-ups I wrote
> about ready for plex86 yet, here are some tests:
> 
> Program: Borland Turbo Pascal bgidemo.exe setaspectratio
> demonstration. CPU: AMD K6/2 300.
> plex86 with freedos guest: 250 sec.
> bochs with freedos guest:    8 sec.
> dosemu with freedos guest:   6.5 sec.
> 
> The read/write memory optimizations would only matter for Bochs at this
> time: I think they would shave around 1.5-2 sec off the total. For
> plex86 that's not noticeable at this point in time.
> 
> You cannot really just turn prescanning off for this kind of 
> code. Generating a page fault for each read/write in VGA memory is too
> expensive as well. The fastest I know of is to emulate the CPU for a
> while after a PF, what is what we're doing in dosemu: making it almost as
> slow as Bochs for graphically intensive code. [for dosemu] We'll still
> need to integrate this with Alberto Vignani's dynamic translation cpu
> emulation however, which should speed things up.
> 
> Bart
> 
> 


Reply via email to