Patchwork [v3,0/8] Huge memory fixes

login
register
mail settings
Submitter Juan Quintela
Date June 22, 2012, 1:46 p.m.
Message ID <cover.1340371865.git.quintela@redhat.com>
Download mbox
Permalink /patch/166605/
State New
Headers show

Pull-request

http://repo.or.cz/r/qemu/quintela.git huge_memory-v2

Comments

Juan Quintela - June 22, 2012, 1:46 p.m.
Hi

The following changes since commit 47ecbdf07ed2c37bdfd2d77137d01bb319ce13da:

  libcacard: build fixes (2012-06-21 20:04:24 +0000)

are available in the git repository at:

  http://repo.or.cz/r/qemu/quintela.git huge_memory-v2

for you to fetch changes up to 565b6c96250305553c21714f3c482d7d408eb4b2:

  Maintain the number of dirty pages (2012-06-22 15:24:14 +0200)


v2:
- Add a define MAX_DELAY (orit suggestion)
- fix handling of dirty pages number (now it is checked that is ok)
- one there, consolidate the handling of the bitmap, limiting access
  to the bitmap to only accessors.

Please review, Juan.


v1:

After a long, long time, this is v2.

This are basically the changes that we have for RHEL, due to the
problems that we have with big memory machines.  I just rebased the
patches and fixed the easy parts:

- buffered_file_limit is gone: we just use 50ms and call it a day

- I let ram_addr_t as a valid type for a counter (no, I still don't
  agree with Anthony on this, but it is not important).

- Print total time of migration always.  Notice that I also print it
  when migration is completed.  Luiz, could you take a look to see if
  I did something worng (probably).

- Moved debug printfs to tracepointns.  Thanks a lot to Stefan for
  helping with it.  Once here, I had to put the traces in the middle
  of trace-events file, if I put them on the end of the file, when I
  enable them, I got generated the previous two tracepoints, instead
  of the ones I just defined.  Stefan is looking on that.  Workaround
  is defining them anywhere else.

- exit from cpu_physical_memory_reset_dirty().  Anthony wanted that I
  created an empty stub for kvm, and maintain the code for tcg.  The
  problem is that we can have both kvm and tcg running from the same
  binary.  Intead of exiting in the middle of the function, I just
  refactored the code out.  Is there an struct where I could add a new
  function pointer for this behaviour?

- exit if we have been too long on ram_save_live() loop.  Anthony
  didn't like this, I will sent a version based on the migration
  thread in the following days.  But just need something working for
  other people to test.

  Notice that I still got "lots" of more than 50ms printf's. (Yes,
  there is a debugging printf there).

- Bitmap handling.  Still all code to count dirty pages, will try to
  get something saner based on bitmap optimizations.

Comments?

Later, Juan.

Juan Quintela (8):
  Add spent time for migration
  Add tracepoints for savevm section start/end
  No need to iterate if we already are over the limit
  Only TCG needs TLB handling
  Only calculate expected_time for stage 2
  Exit loop if we have been there too long
  dirty bitmap: abstract its use
  Maintain the number of dirty pages

 arch_init.c      |   42 ++++++++++++++++++++++++------------------
 cpu-all.h        |    1 +
 exec-obsolete.h  |   50 ++++++++++++++++++++++++++++++--------------------
 exec.c           |   34 ++++++++++++++++++++++------------
 hmp.c            |    2 ++
 migration.c      |   11 +++++++++++
 migration.h      |    1 +
 qapi-schema.json |   12 +++++++++---
 savevm.c         |   11 +++++++++++
 trace-events     |    5 +++++
 10 files changed, 116 insertions(+), 53 deletions(-)