Re: [Qemu-devel] [RFC PATCH 3/4] cpu_exec: Add sleeping algorithm

2014-05-28 Thread Juan Quintela
Sebastian Tanase wrote: > The goal is to sleep qemu whenever the guest clock > is in advance compared to the host clock (we use > the monotonic clocks). The amount of time to sleep > is calculated in the execution loop in cpu_exec. > > Basically, using QEMU_CLOCK_REALTIME, we calculate > the real

Re: [Qemu-devel] [RFC PATCH 3/4] cpu_exec: Add sleeping algorithm

2014-05-28 Thread Sebastian Tanase
- Mail original - > De: "Paolo Bonzini" > À: "Sebastian Tanase" > Cc: aligu...@amazon.com, afaer...@suse.de, r...@twiddle.net, "peter maydell" > , > mich...@walle.cc, a...@alex.org.uk, stefa...@redhat.com, kw...@redhat.com, > quint...@redhat.com, ebl...@redhat.com, > m...@tls.msk.ru,

Re: [Qemu-devel] [RFC PATCH 3/4] cpu_exec: Add sleeping algorithm

2014-05-27 Thread Sebastian Tanase
Hello, First of all thank you for your feedback. - Mail original - > De: "Paolo Bonzini" > À: "Sebastian Tanase" , qemu-devel@nongnu.org > Cc: aligu...@amazon.com, afaer...@suse.de, r...@twiddle.net, "peter maydell" > , > mich...@walle.cc, a...@alex.org.uk, stefa...@redhat.com, kw...@re

Re: [Qemu-devel] [RFC PATCH 3/4] cpu_exec: Add sleeping algorithm

2014-05-27 Thread Paolo Bonzini
Il 27/05/2014 17:49, Sebastian Tanase ha scritto: Why doesn't it have to update original_low and original_extra, and why doesn't it have to take into account original_extra (the new cpu->icount_extra is zero, but what about the old one)? The reason I don't update original_low and original_extra

Re: [Qemu-devel] [RFC PATCH 3/4] cpu_exec: Add sleeping algorithm

2014-05-27 Thread Paolo Bonzini
Il 27/05/2014 16:54, Sebastian Tanase ha scritto: > if (insns_left > 0) { > /* Execute remaining instructions. */ > cpu_exec_nocache(env, insns_left, tb); > +if (icount_al