From: Miroslav Novak <mira@kmlinux.fjfi.cvut.cz>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] intentinoal slowing down qemu - brake
Date: Tue, 5 Dec 2006 22:29:08 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.0612052227210.16924@kmlinux.fjfi.cvut.cz> (raw)
In-Reply-To: <456EF118.4040705@utia.cas.cz>
I'm sending some more facts that should make clear why I think the
functionality provided by the patch is relevant. (At least for the DOS
emulation.)
Making emulated CPU slower
Some old DOS games runs too fast on modern CPUs, even the qemu-emulted
ones. This patch can make these games playable.
The problem was reported in http://qemu-forum.ipi.fi/viewtopic.php?t=1264
Energy saving
MSDOS doesn't use HLT insn. Even if the dosidle can help in command
prompt, it doesn't work in other programs such as games.
This was reported in http://qemu-forum.ipi.fi/viewtopic.php?t=1372
The similar approach is used in dosbox by setting "CPU cycles". I think
qemu is better than dosbox, so it makes sense to me to include such
capability too.
This patch doesn't try to emulate the task scheduler that was why Martin
voted against it. I'm sorry if I wasnt't clear enough in my first post.
Mirek.
On Thu, 30 Nov 2006, Miroslav Novak wrote:
> This patch adds support for slowing down qemu and saving cpu load.
> The '-brake' command line parameter or monitor command 'brake' determines how
> long to wait in the main_loop with respect to duration of time that qemu used
> for the emulation itself.
> Thus e.g. zero value runs at full speed, 1 at 1/2 speed, 10 at 1/11 speed,
> etc.
>
> A drawback of this approach is that the timer interrupt can be missed if
> raised too often. This happens if the loop_main divided by (1+brake) is less
> than the frequency of PIC interrupts.
> In such case the time of emulated system runs slowly.
>
> This problem occurs mainly for Linux emulation where kernel parameter HZ is of
> several hunderds.
> For DOS emulation, where the timer interrupts are raised usualy at 18Hz, this
> approach works nice, and one can play old DOS games at reasonable speed and
> save batteries.
>
>
> Mirek
>
>
next prev parent reply other threads:[~2006-12-05 21:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-30 14:56 [Qemu-devel] [PATCH] intentinoal slowing down qemu - brake Miroslav Novak
2006-12-01 15:41 ` Martin Guy
2006-12-01 15:43 ` Martin Guy
2006-12-01 19:35 ` Johannes Schindelin
2006-12-01 21:59 ` SoftICE under DOS16, anybody? __/__ " Martin Bochnig
2006-12-01 23:43 ` Martin Bochnig
2006-12-05 16:54 ` Miroslav Novak
2006-12-05 21:29 ` Miroslav Novak [this message]
2006-12-06 7:03 ` Manish Gajbhiye
2006-12-06 9:52 ` Network problem, was " Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0612052227210.16924@kmlinux.fjfi.cvut.cz \
--to=mira@kmlinux.fjfi.cvut.cz \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).