qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH][RFC] x86: use globals for CPU registers


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH][RFC] x86: use globals for CPU registers
Date: Sun, 27 Sep 2009 14:51:39 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Sun, Sep 13, 2009 at 11:00:08PM +0200, Laurent Desnogues wrote:
> Hello,
> 
> this patch is a proposal to use globals for the 8 or 16 CPU
> registers on i386 and x86_64.
> 
> I measured the improvement in the following conditions:
> 
>   - Machine:  i7 920
>   - Software:  Fedora11 x86_64 gcc 4.4.1
>   - Benchmark: SPEC2000 gcc with expr.i input
>   - User mode
>   - i386 and x86_64 hosts and targets, with and without the patch
>     (8 combinations)
> 
> The results are:
> 
> qemu-i386_on-i386          15.82user 0.05system 0:15.91elapsed
> qemu-i386_on-i386-reg      15.40user 0.02system 0:15.43elapsed
> qemu-i386_on-x86_64        15.65user 0.05system 0:15.71elapsed
> qemu-i386_on-x86_64-reg    15.11user 0.03system 0:15.15elapsed
> qemu-x86_64_on-i386        mmap: No such device or address
> qemu-x86_64_on-i386-reg    mmap: No such device or address
> qemu-x86_64_on-x86_64      18.42user 0.07system 0:18.49elapsed
> qemu-x86_64_on-x86_64-reg  13.22user 0.06system 0:13.31elapsed
> 
> Given my lack of knowledge of system QEMU, I will leave it to
> someone else to measure the speedup.
> 

Here are my benchmarks in system mode. I measured the improvement in the
following conditions:
  - Machine: Intel Core 2 Quad Q9450 with 8GB RAM
  - Intel Speedstep disabled
  - Host: Debian Sid amd64 (kernel 2.6.31, gcc 4.3, glibc 2.9)
  - Benchmark: boot time, compilation of small C++ application
  - Guests: Debian Lenny amd64 and i386, preloaded into memory
    with readahead.

+-------------+-------+-------+-----------+------------------+
| qemu target | guest | patch | boot time | compilation time |
+-------------+-------+-------+-----------+------------------+
|        i386 |  i386 |    no |       55s |            19.9s |
|        i386 |  i386 |   yes |       54s |            19.8s |
|      x86_64 |  i386 |    no |       67s |            24.6s |
|      x86_64 |  i386 |   yes |       63s |            23.3s |
|      x86_64 | amd64 |    no |       61s |            19.9s |
|      x86_64 | amd64 |   yes |       58s |            18.7s |
+-------------+-------+-------+-----------+------------------+

There is always a measurable gain, and even significant gain for
qemu-system-x86_64. This is consistent with the user mode benchmarks.
The gains are probably less important in system mode due to the chosen
benchmarks.

I think this patch is clearly a step in the right direction to a clean
target-i386 code, and I will be happy to commit it once it has been 
cleaned.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
address@hidden                 http://www.aurel32.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]