Skip to content

kvm tools: remove periodic tick

Jonathan Austin kvm 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesNew
  2. v23 patches 6 repliesSuperseded
  3. v13 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- force the flushing of the tx queue for serial console emulation
- test that this doesn't degrade performance considerably

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3kvm tools: use #define for maximum number of terminal devicestools/kvm/term.c+4 -30 replies
2/3kvm tools: remove periodic tick in favour of a polling threadtools/kvm/arm/kvm.c tools/kvm/builtin-run.c tools/kvm/hw/serial.c +5 more+36 -760 replies
3/3kvm tools: stop virtio console doing unnecessary input handlingtools/kvm/virtio/console.c+20 -30 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMarc Zyngier
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] kvm tools: remove periodic tick

This patch series removes kvm tool's periodic tick function in favour of a thread that blocks waiting for input. The paths used for handling input are the same as when using a periodic tick, but they're not called unless there is actually input to be processed.

On extremely slow platforms (eg FPGAs) the overhead involved in handling the timer tick means it is possible to make progress at all inside the VM! This patch addresses this problem.

In doing this there are a number of small tidyups/cleanups that made sense, too:
- Use a #define for maximum number of term devices
- Refactor the method by which the virtio console handles input in order not to
- handle input too early
- handle input multiple times if the worker thread didn't immediately start work.
- Rename the periodic_poll function to reflect the functional change

---
Changes since V1:
- s/kvm__arm_read_term/kvm__arch_read_term/ in patch2's coverletter
- make term_poll_thread static
- Added Marc's ack

Changes since V2:
- force the flushing of the tx queue for serial console emulation
- test that this doesn't degrade performance considerably

Jonathan Austin (3):
kvm tools: use #define for maximum number of terminal devices kvm tools: remove periodic tick in favour of a polling thread kvm tools: stop virtio console doing unnecessary input handling

 tools/kvm/arm/kvm.c         |    2 +-
 tools/kvm/builtin-run.c     |   13 -----------
 tools/kvm/hw/serial.c       |   10 +--------
 tools/kvm/include/kvm/kvm.h |    2 +-
 tools/kvm/kvm.c             |   50 -------------------------------------------
 tools/kvm/powerpc/kvm.c     |    2 +-
 tools/kvm/term.c            |   38 +++++++++++++++++++++++++++++---
 tools/kvm/virtio/console.c  |   23 +++++++++++++++++---
 tools/kvm/x86/kvm.c         |    2 +-
 9 files changed, 60 insertions(+), 82 deletions(-)
Signature · 1 line
1.7.9.5