Re: [Qemu-devel] [PATCH 1/7] blockjob: record time of last yield

2017-12-18 Thread Stefan Hajnoczi
On Thu, Dec 14, 2017 at 10:55:22AM -0500, John Snow wrote: > > > On 12/14/2017 03:38 AM, Paolo Bonzini wrote: > > On 14/12/2017 01:59, John Snow wrote: > >> qemu_coroutine_yield(); > >> +job->last_yield_ns = qemu_clock_get_ns(QEMU_CLOCK_REALTIME); > > > > This is not the time the job

Re: [Qemu-devel] [PATCH 1/7] blockjob: record time of last yield

2017-12-14 Thread John Snow
On 12/14/2017 03:38 AM, Paolo Bonzini wrote: > On 14/12/2017 01:59, John Snow wrote: >> qemu_coroutine_yield(); >> +job->last_yield_ns = qemu_clock_get_ns(QEMU_CLOCK_REALTIME); > > This is not the time the job has yielded control, but the time the job > has gotten it back. Is it

Re: [Qemu-devel] [PATCH 1/7] blockjob: record time of last yield

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > qemu_coroutine_yield(); > +job->last_yield_ns = qemu_clock_get_ns(QEMU_CLOCK_REALTIME); This is not the time the job has yielded control, but the time the job has gotten it back. Is it intended? Thanks, Paolo

[Qemu-devel] [PATCH 1/7] blockjob: record time of last yield

2017-12-13 Thread John Snow
The mirror job makes a semi-inaccurate record of the last time we left a "pause", but this doesn't always correlate to the time we actually last successfully yielded control. Record the time we last left a yield centrally. Signed-off-by: John Snow --- block/mirror.c