[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/7] blockjob: record time of last yield
From: |
John Snow |
Subject: |
Re: [Qemu-devel] [PATCH 1/7] blockjob: record time of last yield |
Date: |
Thu, 14 Dec 2017 10:55:22 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
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 intended?
>
> Thanks,
>
> Paolo
>
Yes, since that matches how mirror recorded last_sleep_ns, except for
where it records the 0ns sleep, then it records it beforehand (close
enough.)
I intended for this valuable to count how long we haven't yielded,
basically. Thought being that any time we are yielded, we're being
cooperative.
This is the selfishness counter :)