Title: Samsung Enterprise Portal mySingle

Hi.

It is well known that the generated codes from qemu_ld/st IRs to access guest memory are relatively heavy, which are up to 12 instructions for i386 host in TLB hit case.
This patch series enhances the code quality of TCG qemu_ld/st IRs by reducing jump and enhancing locality. The main idea is simple and has been already described in the comments in tcg-target.c. It separates slow path, i.e., TLB miss case, and generates it at the end of TB.

For example, the generated code from qemu_ld changes as follow.


* Before:
(1) TLB check
(2) If hit fall through, else jump to TLB miss case (5)
(3) TLB hit case: Load value from host memory
(4) Jump to next code (6)
(5) TLB miss case: call MMU helper
(6) ... (next code)


* After:
(1) TLB check
(2) If hit fall through, else jump to TLB miss case (5)
(3) TLB hit case: Load value from host memory
(4) ... (next code)
...
(5) TLB miss case: call MMU helper
(6) Return to next code (4)


Following is some performance results.
Although there was measurement error, the results was not negligible.


* EEMBC CoreMark (before -> after)
  - Guest: i386, Linux (Tizen platform)
  - Host: Intel Core2 Quad 2.4GHz, 2GB RAM, Linux
  - Results: 1135.6 -> 1179.9 (+3.9%)


* nbench (before -> after)
  - Guest: i386, Linux (linux-0.2.img included in QEMU source)
  - Host: Intel Core2 Quad 2.4GHz, 2GB RAM, Linux
  - Results
    . MEMORY INDEX: 1.6782 -> 1.6818 (+0.2%)
    . INTEGER INDEX: 1.8258 -> 1.877 (+2.8%)
    . FLOATING-POINT INDEX: 0.5944 -> 0.5954 (+0.2%)

 

Yeongkyoon Lee (3):
 tcg: add extended MMU helper functions
 tcg: add optimized TCG qemu_ld/st generation
 configure: add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization

 configure             |    7 +
 exec-all.h            |   18 ++-
 softmmu_template.h    |  123 +++++++++++++++
 tcg/i386/tcg-target.c |  392 +++++++++++++++++++++++++++++++++++++++++++++++++
 tcg/tcg.c             |  136 ++++++++++--------
 tcg/tcg.h             |   45 +++++-
 6 files changed, 656 insertions(+), 65 deletions(-)

Reply via email to