Message ID | 1436413678-7114-3-git-send-email-famz@redhat.com |
---|---|
State | New |
Headers | show |
On Thu, Jul 09, 2015 at 11:47:57AM +0800, Fam Zheng wrote: > Sleeping for 0 second may not be as effective as we want, use > block_job_relax_cpu. > > Signed-off-by: Fam Zheng <famz@redhat.com> > --- > block/mirror.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff --git a/block/mirror.c b/block/mirror.c index 62db031..ca55578 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -438,7 +438,7 @@ static void coroutine_fn mirror_run(void *opaque) if (now - last_pause_ns > SLICE_TIME) { last_pause_ns = now; - block_job_sleep_ns(&s->common, QEMU_CLOCK_REALTIME, 0); + block_job_relax_cpu(&s->common); } if (block_job_is_cancelled(&s->common)) {
Sleeping for 0 second may not be as effective as we want, use block_job_relax_cpu. Signed-off-by: Fam Zheng <famz@redhat.com> --- block/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)