[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH V4 0/6] icount: Implement delay algorithm be
From: |
Sebastian Tanase |
Subject: |
Re: [Qemu-devel] [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest and host clocks |
Date: |
Tue, 22 Jul 2014 16:02:41 +0200 (CEST) |
----- Mail original -----
> De: "Paolo Bonzini" <address@hidden>
> À: "Sebastian Tanase" <address@hidden>, address@hidden
> Cc: address@hidden, address@hidden, address@hidden, "peter maydell"
> <address@hidden>,
> address@hidden, address@hidden, address@hidden, address@hidden,
> address@hidden,
> address@hidden, address@hidden, address@hidden, address@hidden,
> address@hidden, "camille begue"
> <address@hidden>
> Envoyé: Mercredi 16 Juillet 2014 15:20:00
> Objet: Re: [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest
> and host clocks
>
> Il 16/07/2014 14:18, Sebastian Tanase ha scritto:
> > v3 -> v4
> >
> > * Add better error handling for 'strtol' in patch 2
> > * Add 'Sleep' instead of 'nanosleep' for Windows hosts in patch 4
> > * Remove function pointers from patches 4 and 5
>
> Hi Sebastian, I think we're getting really close.
>
> I asked a question about clocks_offset; I think it's not necessary to
> compute it in cpu-exec.c because the same information is available
> elsewhere. It is also probably not necessary to make it public. Can
> you please check this? Once this is sorted out, the patch should be
> ready for inclusion in 2.2.
>
> Thanks for your effort!
>
> Paolo
>
Hello,
Supposing the patch that changes vm_clock_warp_start from 0 to -1 is accepted,
I could use the information in timers_state.cpu_clock_offset instead of
recalculating
the offset. Besides, given that I only need this particular field from the
whole
structure, I think I don't have to make timers_state public; I could add a
function
in cpus.c, for example:
int64_t cpu_get_clock_offset(void)
{
int64_t ti;
unsigned start;
do {
start = seqlock_read_begin(&timers_state.vm_clock_seqlock);
ti = -timers_state.cpu_clock_offset;
} while (seqlock_read_retry(&timers_state.vm_clock_seqlock, start));
return ti;
}
that will return the cpu_clock_offset field.
Best regards,
Sebastian
- [Qemu-devel] [RFC PATCH V4 3/6] icount: Make icount_time_shift available everywhere, (continued)
[Qemu-devel] [RFC PATCH V4 5/6] cpu_exec: Print to console if the guest is late, Sebastian Tanase, 2014/07/16
[Qemu-devel] [RFC PATCH V4 2/6] icount: Add align option to icount, Sebastian Tanase, 2014/07/16
Re: [Qemu-devel] [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest and host clocks, Paolo Bonzini, 2014/07/16
- Re: [Qemu-devel] [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest and host clocks,
Sebastian Tanase <=
- Re: [Qemu-devel] [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest and host clocks, Paolo Bonzini, 2014/07/22
- Re: [Qemu-devel] [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest and host clocks, Sebastian Tanase, 2014/07/22
- Re: [Qemu-devel] [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest and host clocks, Paolo Bonzini, 2014/07/22
- Re: [Qemu-devel] [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest and host clocks, Sebastian Tanase, 2014/07/22
- Re: [Qemu-devel] [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest and host clocks, Paolo Bonzini, 2014/07/22
Re: [Qemu-devel] [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest and host clocks, Luiz Capitulino, 2014/07/16