[SLOF] [PATCH v2 0/6] Accelerate the screen drawing functions

Thomas Huth thuth at redhat.com
Tue Aug 4 05:30:55 AEST 2015


While working on the cursor drawing issues, I've noticed that
some other functions in the framebuffer code of SLOF could be
accelerated quite a bit. The first two patches are rather
cosmetic and do not contribute much to the speed improvement,
but the following two patches speed up the drawing quite a lot!

There are two core functions, MRMOVE and RFILL, which are used
by the drawing functions to write to the framebuffer and which
were not really adapted to the KVMPPC_H_LOGICAL_MEMOP of
board-qemu yet (i.e. they were written with js2x in mind).
So they both triggered a hypercall for every 8-byte access
to the framebuffer instead of handling larger transfers at
once. By implementing a proper accelerated version of these
calls, the text drawing and screen-erasing can be speed-up
quite a bit:

- Fixing MRMOVE improves the character drawing by factor 2
  or more (the "benchmark" that I've published in my
  cover-letter of the cursor-improvement series earlier
  this week now only takes 0.3 s instead of 0.8 s!)

- Fixing RFILL improves the screen erasing function by
  factor 10 or even more! The function "erase-screen"
  took approx. 1.3 s before the fix, and now only takes
  0.1 s after the fix.

Both fixes also speed up grub in graphical mode quite a bit,
since grub apparently uses the firmware to erase the screen.

v2:
- Cosmetic changes according to the review feedback from v1
- Move the hunk to remove the RMOVE64 comment into a
  separate patch
- Added a new patch to fix the 16-bit alignment check in
  _FASTMOVE and _FASTRMOVE

Thomas Huth (6):
  terminal: Disable the terminal-write trace by default
  fbuffer: Precalculate line length in bytes
  fbuffer: Implement MRMOVE as an accelerated primitive
  fbuffer: Implement RFILL as an accelerated primitive
  Remove unused RMOVE64 stub
  Add missing half word access case to _FASTRMOVE and _FASTMOVE

 include/ppc970/cache.h | 50 +++++++++++++++++++++++++++++++++++++++++++----
 include/ppcp7/cache.h  | 22 +++++++++++++++++----
 slof/fs/base.fs        |  2 --
 slof/fs/fbuffer.fs     | 25 +++++++++++++-----------
 slof/fs/rmove.fs       | 53 --------------------------------------------------
 slof/fs/terminal.fs    |  3 ++-
 slof/prim.code         | 13 +++++++++++++
 slof/prim.in           |  3 ++-
 8 files changed, 95 insertions(+), 76 deletions(-)
 delete mode 100644 slof/fs/rmove.fs

-- 
1.8.3.1



More information about the SLOF mailing list