Re: Running bochs is pegging one CPU core
"Stanislav" <[email protected]> Sat, 28 Mar 2015 14:04:59 +0300
| Newsgroups | gmane.comp.emulators.bochs.devel |
|---|---|
| Message-ID | <[email protected]> |
You have to define how the long the emulated second is in terms of host time. This is defined in term of IPS. IPS means “instructions per second” so 100M IPS defines a second within the emulator. After 100M executed instructions it assumes that a second got passed. With this definition, of course, guest will never run faster than host because of emulation overhead but sometimes it is also not needed. Let’s say your host is very strong and capable to emulate 500M instructions per host second. Regularly emulator will take 100% host CPU time and will reach the 500M. But you actually need only 100M you could reduce CPU utilization to 20% and get 100M instead of 500M. This is exactly what ‘slowdown’ timer does. The main problem of any IPS based time definition is variable second length. To emulate 100M could take different time depend on the actual instructions and someone doesn’t like with variety. With ‘realtime’ emulated second defined based on host time and not on the IPS. This is completely not reproducible but should behave better in terms of user-experience and performance. Stanislav From: Thomson [mailto:[email protected]] Sent: Saturday, March 28, 2015 6:39 AM To: Stanislav Cc: [email protected] Subject: Re: [Bochs-developers] Running bochs is pegging one CPU core Thanks. This works. I looked at the doc for slowdown option in http://bochs.sourceforge.net/doc/docbook/user/bochsrc.html but cannot get it (see below) clearly. What's meaning and especially for reproducibility and host-time correlation. Sorry for the stupid and simple question. clock: sync=[none|slowdown|realtime|both], time0=[timeValue|local|utc] This defines the method how to synchronize the Bochs internal time with realtime. With the value 'none' the Bochs time relies on the IPS value and no host time synchronization is used. The 'slowdown' method sacrifices performance to preserve reproducibility while allowing host time correlation. The 'realtime' method sacrifices reproducibility to preserve performance and host-time correlation. It is possible to enable both synchronization methods. On Sat, Mar 28, 2015 at 5:42 AM, Stanislav <[email protected]> wrote: This is already existing. Read about slowdown timer – it does exact what you show, it will reduce host CPU load by Bochs if you don’t need too much emulation speed. From: Thomson [mailto:[email protected]] Sent: Tuesday, March 24, 2015 11:24 AM To: [email protected] Subject: [Bochs-developers] Running bochs is pegging one CPU core Hi all, I understand that the CPU interpretation loop of bochs consumes runs forever to do its work, so pegging one core makes sense, but is there some way to make it consume less CPU, like sleep a very little time between instructions. This is at the cost of lower speed, but it is important on some platform like notebook. Thanks Thomson ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ bochs-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bochs-developers